/* site.v2.css — duplicate of new minimal stylesheet to force fresh deployment */
:root{
  --bg: #fbfbfc;
  --paper: #ffffff;
  --ink: #111213;
  --muted: #6b7280;
  --border: #e6e9ee;
  --accent: #2b2f33;
  --font-sans: 'Inter', 'Noto Sans JP', system-ui, -apple-system, 'Segoe UI', Roboto, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Arial, sans-serif;
  --font-head: 'Noto Serif JP', 'Merriweather', 'Times New Roman', serif;
}

/* Box model and base reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; font-family: var(--font-sans); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }

/* Layout container */
.container { max-width: 880px; margin: 0 auto; padding: 18px 16px; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
nav { display: flex; align-items: center; justify-content: space-between; }

/* Headings — use a serif for a refined, newspaper-like tone */
h1, h2, h3 { font-family: var(--font-head); color: var(--accent); margin: 0 0 12px 0; }
h1 { font-size: 2.0rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
.brand { font-family: var(--font-head); letter-spacing: -0.02em; }

/* Grid / cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 18px 0 36px; justify-items: center; }
.card { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 20px rgba(16,24,32,0.04); width: 100%; max-width: 340px; }
.card img { width: 100%; height: auto; object-fit: cover; display: block; }
/* Enforce thumbnail caps: max horizontal 256px, max vertical 200px.
  Provide a .thumb wrapper to strongly cap height and center-crop via object-fit. */
.grid .card img, .card img { max-width: 256px; max-height: 200px; width: auto; height: auto; }
.grid .card .thumb, .card .thumb { width: 100% !important; max-width: 256px !important; height: 200px !important; overflow: hidden !important; display: block !important; }
.grid .card .thumb img, .card .thumb img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; max-height: 200px !important; }
.card .p { padding: 12px; }

/* Article */
.article { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 18px auto 40px; max-width: 820px; width: 100%; box-shadow: 0 8px 20px rgba(16,24,32,0.04); }
figure { margin: 12px 0; }
figcaption { font-size: 13px; color: var(--muted); }

/* Block components */
.block { margin: 14px 0; }
.block.flex { display: flex; gap: 16px; align-items: flex-start; }

/* Default image/text layout inside blocks (flex) */
.block .imgwrap { flex: 0 0 38%; }
.block .imgwrap img { width: 100%; height: auto; display: block; border-radius: 8px; }
.block .text { flex: 1; }

/* Newspaper-style flow when explicit left/right classes are present.
  Many articles emit: class="block flex left" — here we override flex and
  use floats so the following text wraps around the image. */
.block.left, .block.right { display: block; }
.block.left .imgwrap, .block.right .imgwrap { width: 42%; max-width: 46%; }
.block.left .imgwrap { float: left; margin: 0 16px 12px 0; }
.block.right .imgwrap { float: right; margin: 0 0 12px 16px; }
.block.left .imgwrap img, .block.right .imgwrap img { width: 100%; height: auto; display: block; border-radius: 8px; }

/* Ensure text wraps nicely */
.block .text { overflow-wrap: break-word; line-height: 1.6; }

/* Clearfix for floated images */
.block::after { content: ""; display: table; clear: both; }

/* Keep ordering when flex is used but right-positioning is desired */
.block.right .imgwrap { order: 2; }

/* Read progress bar */
.readbar { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0%; z-index: 60; }

/* Footer */
.footer { padding: 18px 0; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid rgba(16,24,32,0.03); }

/* Responsive adjustments */
@media (max-width: 720px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .block.flex { display: block; }
  .block .imgwrap { width: 100%; flex-basis: auto; }
}

@media (max-width: 720px) {
  /* On narrow viewports allow images to fill container but still cap height */
  .grid .card img, .card img { width: 100%; height: auto; max-height: 200px; }
  .grid .card .thumb, .card .thumb { width: 100%; height: 200px; }
  .grid .card .thumb img, .card .thumb img { height: 100%; width: 100%; object-fit: cover; }
}


/* Prevent accidental horizontal overflow */
html, body { overflow-x: hidden; }

/* Header — tasteful navy → blue gradient */
.header {
  background-image: linear-gradient(135deg, #0d3b76 0%, #2b7bdc 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(11,22,40,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header .brand { color: #ffffff; }
.header nav .links a { color: rgba(255,255,255,0.9); }
.header nav .links a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Footer — soft aqua wash */
.footer {
  background-image: linear-gradient(180deg, rgba(43,123,191,0.06), rgba(43,123,191,0.02));
  color: var(--muted);
}

/* Pager styles */
.pager { margin: 24px 0 60px; text-align: center; }
.pager-inner { display: inline-flex; gap: 12px; align-items: center; background: transparent; padding: 8px 12px; border-radius: 10px; }
.pager a { color: var(--accent); text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.pager a:hover { background: rgba(43,123,191,0.06); }
.pager .pager-current { font-weight: 700; padding: 6px 8px; color: var(--ink); }
.pager .disabled { color: #c2c6cc; }

/* Article prev/next navigation */
.article-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; border-top: 1px solid var(--border); padding-top: 16px; }
.article-nav a { color: var(--accent); text-decoration: none; padding: 8px 12px; border-radius: 8px; background: rgba(43,123,191,0.03); }
.article-nav a:hover { background: rgba(43,123,191,0.06); }




