/* Article pages: the list (article/index.html) and each article (article/<name>/index.html).
   Pages are made by scripts/build-articles.js; loaded after style.css and discover.css.
   Design C (2026.11.17): Nanum Myeongjo headings, Bodoni Moda dates, square corners, rules not boxes. */

/* ---- List page head (design A, 2026.11.19): the shared title bar (.page-title in discover.css), then one filter row ---- */
/* One row: category tabs (underlined when chosen) | level buttons on the right */
.a-filter { display: flex; align-items: center; gap: 16px; border-top: 3px solid var(--fg); border-bottom: 1px solid var(--line); }
.a-tabs { display: flex; min-width: 0; }
.a-tab { font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; padding: 13px 0; margin-right: 24px; border: 0; border-radius: 0; background: none; color: var(--ink-soft); cursor: pointer; box-shadow: inset 0 -3px 0 transparent; }
.a-tab:hover { color: var(--fg); }
.a-tab[aria-pressed="true"] { color: var(--fg); box-shadow: inset 0 -3px 0 var(--fg); }
.a-seg { display: flex; align-items: center; flex: none; margin-left: auto; }
.a-seg-lbl { margin-right: 8px; font-size: 13px; color: var(--ink-soft); }
.a-segb { font: inherit; font-size: 13px; line-height: 1; padding: 7px 10px; margin-left: -1px; border: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.a-segb:hover { color: var(--fg); }
.a-segb[aria-pressed="true"] { position: relative; background: var(--fg); border-color: var(--fg); color: var(--bg); }
.a-list { margin-top: 4px; }

/* ---- List ---- */
.a-list { list-style: none; }
.a-item { border-bottom: 1px solid var(--line); }
.a-item[hidden] { display: none; }
.a-item > a { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 20px 0; align-items: start; }
.a-item .thumb { aspect-ratio: 3 / 2; }
.a-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.a-kick { font-size: 14px; line-height: 1.6; }
.a-kick .cat { font-weight: 600; color: var(--accent); }
.a-item h3 { margin-top: 4px; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.4; letter-spacing: -0.02em; }
.a-item a:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.a-item .a-dek { margin-top: 6px; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.a-item .meta { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.a-item .d, .a-by .d { font-family: var(--num); font-size: 15px; }
/* The newest article (or the newest after filtering) leads the list, a size up */
.a-item.top > a { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; padding: 24px 0 26px; }
.a-item.top .thumb { aspect-ratio: 16 / 10; }
.a-item.top .thumb.lc { font-size: 34px; padding: 16px 18px; }
.a-item.top h3 { font-weight: 800; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.35; letter-spacing: -0.03em; text-wrap: balance; }
.a-item.top .a-dek { font-family: var(--serif); font-size: 17px; }
.a-empty { padding: 28px 0; text-align: center; font-size: 16px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.a-empty[hidden] { display: none; }
.a-lvnote { font-size: 15px; line-height: 1.7; color: var(--ink-soft); }
.a-lvnote + .a-lvnote { margin-top: 10px; }
.a-lvnote .lv { margin-left: 0; margin-right: 4px; }
@media (max-width: 640px) {
  .a-item > a { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .a-item .thumb { aspect-ratio: 1 / 1; }
  .a-item h3 { font-size: 19px; }
  .a-item .a-dek { display: none; }
  .a-item.top > a { grid-template-columns: 1fr; gap: 14px; }
  .a-item.top .a-dek { display: block; }
}
@media (max-width: 760px) {
  /* Phones: the tabs scroll sideways in one row; the level buttons go under them */
  .a-filter { flex-wrap: wrap; gap: 0; }
  .a-tabs { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .a-tabs::-webkit-scrollbar { display: none; }
  .a-seg { margin: 10px 0 10px; }
}

/* ---- One article: design B "newspaper column" (owner's choice 2026.11.19) ----
   Title on the left; a cover only when there is a photo (no black card in its place);
   a narrow rail on the left with writer, date and level; the body in one column.
   Text tightened: 17px, line height 1.7 (owner chose from 1.5 · 1.6 · 1.7). No red pull quote: quotes are black with a side rule. */
.a-page { padding-top: 40px; }
.a-head { max-width: 860px; }
.a-head h1 { margin: 10px 0 12px; font-family: var(--serif); font-weight: 800; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; letter-spacing: -0.04em; text-wrap: balance; }
/* Lead: the standfirst under the title */
.a-head .a-dek { max-width: 720px; font-size: 18px; line-height: 1.6; letter-spacing: -0.015em; color: var(--ink-soft); }
.a-cover { margin-top: 28px; }
.a-cover img { width: 100%; height: auto; }
.a-cover figcaption, .a-body figcaption { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.a-cover .credit, .a-body .credit { margin-left: 6px; }

.a-grid { display: grid; grid-template-columns: 200px minmax(0, 640px); gap: 48px; margin-top: 32px; }
/* Rail: follows the reader down on wide screens */
.a-rail { align-self: start; position: sticky; top: 20px; border-top: 3px solid var(--fg); padding-top: 10px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.a-rail > span { display: block; }
.a-rail b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--fg); }
.a-rail .d { margin-top: 10px; font-family: var(--num); font-size: 16px; color: var(--fg); }
.a-rail .lvrow { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.a-rail .lv { margin-left: 0; }

/* Body */
.a-body { font-size: 17px; line-height: 1.7; letter-spacing: -0.01em; }
.a-body p + p, .a-body h2 + p, .a-body h3 + p, .a-body blockquote + p, .a-body hr + p, .a-body ul + p, .a-body ol + p, .a-body figure + p { margin-top: 0.95em; }
/* First paragraph a size up, instead of a drop cap */
.a-body > p:first-child { font-size: 19px; line-height: 1.63; letter-spacing: -0.02em; }
.a-body h2 { margin: 1.7em 0 0.45em; font-family: var(--serif); font-weight: 800; font-size: 21px; line-height: 1.4; letter-spacing: -0.03em; }
.a-body h3 { margin: 1.5em 0 0.4em; font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.45; letter-spacing: -0.02em; }
.a-body blockquote { margin: 1.6em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--fg); }
.a-body blockquote p { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.5; letter-spacing: -0.025em; color: var(--fg); }
.a-body blockquote cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: var(--ink-soft); }
.a-body figure { margin: 1.6em 0; }
.a-body figure img { width: 100%; height: auto; }
.a-body ul, .a-body ol { margin-top: 0.95em; padding-left: 1.3em; }
.a-body li + li { margin-top: 0.25em; }
.a-body a { text-decoration: underline; text-underline-offset: 3px; }
.a-body a:hover { color: var(--accent); }
.a-body strong { font-weight: 700; }
.a-body hr { margin: 1.8em 0; border: 0; text-align: center; }
.a-body hr::after { content: "* * *"; font-family: var(--num); font-size: 16px; letter-spacing: 0.5em; color: var(--ink-soft); }

/* End of the article (under the body): writer note, level note, ways out */
.a-end { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--fg); font-size: 14px; line-height: 1.65; color: var(--ink-soft); }
.a-end .a-lvnote { font-size: 14px; }
.a-back { margin-top: 10px; }
.a-back a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.a-back a:hover { color: var(--accent); }
.a-more { margin-top: 56px; margin-bottom: 8px; }

@media (max-width: 860px) {
  .a-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
  .a-rail { position: static; display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
  .a-rail > span { display: inline; }
  .a-rail b { display: inline; font-size: 16px; }
  .a-rail .d, .a-rail .lvrow { margin: 0; padding: 0; border: 0; }
}
@media (max-width: 760px) {
  .a-page { padding-top: 26px; }
  .a-head .a-dek { font-size: 17px; }
  .a-body > p:first-child { font-size: 18px; }
  .a-body blockquote p { font-size: 19px; }
}

/* List thumbnails: long cover words ("Interview") get smaller so they stay inside the black card */
.a-item .thumb.lc { overflow: hidden; }
.a-item .thumb.lc.long { font-size: 18px; }
.a-item.top .thumb.lc.long { font-size: 30px; }
@media (max-width: 640px) { .a-item:not(.top) .thumb.lc.long { font-size: 14px; padding: 8px; } }
