  :root {
    --ink: #1A1917;
    --ink-soft: #55524B;
    --paper: #FFFFFF;
    --paper-raised: #FFFFFF;
    --rule: #EFEEEB;
    --rule-strong: #C8C4BA;
    --brand: #1B4784;
    --brand-soft: #E3EAF4;
    --danger: #A33A2A;
    --focus: #1B4784;
    color-scheme: light;
    font-size: 16px;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-local-theme="light"]) {
      --ink: #ECEAE4;
      --ink-soft: #A7A398;
      --paper: #141413;
      --paper-raised: #1D1C1A;
      --rule: #2E2C28;
      --rule-strong: #4A4740;
      --brand: #8FB0E3;
      --brand-soft: #1F2B3F;
      --danger: #E08A78;
      --focus: #8FB0E3;
      color-scheme: dark;
    }
  }
  :root[data-local-theme="dark"] {
    --ink: #ECEAE4;
    --ink-soft: #A7A398;
    --paper: #141413;
    --paper-raised: #1D1C1A;
    --rule: #2E2C28;
    --rule-strong: #4A4740;
    --brand: #8FB0E3;
    --brand-soft: #1F2B3F;
    --danger: #E08A78;
    --focus: #8FB0E3;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Spectral', Georgia, 'Times New Roman', serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
  ::selection { background: var(--brand); color: var(--paper-raised); }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  header.masthead { padding: 32px 0 0; }
  .masthead-logo { display: flex; align-items: center; justify-content: center; gap: 0.4em; margin: 0 auto 16px; color: var(--brand); font-family: 'Spectral', Georgia, serif; font-size: 50px; line-height: 1; }
  .masthead-mark { width: 0.92em; height: 0.92em; flex: none; fill: currentColor; }
  .masthead-word { font-weight: 400; letter-spacing: 0.22em; margin-right: -0.22em; }
  .masthead-rule { width: 340px; max-width: 64%; height: 1px; background: var(--rule-strong); margin: 0 auto 14px; }
  .masthead-inner { text-align: center; padding-bottom: 18px; border-bottom: 3px double var(--rule-strong); }
  .masthead h1 { font-size: clamp(1.05rem, 2.4vw, 1.45rem); font-weight: 500; font-style: italic; letter-spacing: 0.01em; color: var(--ink); margin: 0; line-height: 1.3; }
  .masthead .tagline { font-style: italic; color: var(--ink-soft); margin: 6px 0 0; font-size: 1.05rem; }
  .masthead .issue-line {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; color: var(--ink-soft);
    margin-top: 14px; display: flex; justify-content: space-between;
    border-top: 1px solid var(--rule); padding-top: 10px;
  }

  nav.primary { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
  nav.primary .navrow { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
  nav.primary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 22px; font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.9rem; }
  nav.primary a { display: inline-block; padding: 12px 0; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; }
  nav.primary a:hover, nav.primary a:focus-visible { color: var(--ink); border-bottom-color: var(--brand); }
  nav.primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
  nav.primary ul.nav-right { gap: 0; }

  main.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 36px 24px 60px; align-items: start; }
  @media (max-width: 780px) { main.layout { grid-template-columns: minmax(0, 1fr); } main.layout > * { min-width: 0; } }
  main.wrap.single { padding: 36px 24px 60px; max-width: 808px; }

  .page:not([data-local-active="true"]) { display: none; }

  .controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; font-family: 'Schibsted Grotesk', sans-serif; }
  .controls input[type="search"] { flex: 1; min-width: 160px; padding: 9px 12px; border: 1px solid var(--rule-strong); background: var(--paper-raised); color: var(--ink); font-family: inherit; font-size: 0.88rem; border-radius: 3px; }
  .filter-btn { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.82rem; padding: 8px 13px; background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-soft); border-radius: 3px; cursor: pointer; }
  .filter-btn[aria-pressed="true"] { background: var(--brand); color: var(--paper-raised); border-color: var(--brand); }

  #featured-slot:empty { display: none; }
  #featured-slot .entry {
    border: 1px solid var(--rule-strong);
    border-top: 4px solid var(--brand);
    background: var(--paper-raised);
    border-radius: 4px;
    padding: 22px 24px;
    margin-bottom: 30px;
  }
  #featured-slot .entry h2 { font-size: 1.65rem; }
  .featured-label {
    display: inline-block;
    font-family: 'Schibsted Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0.03em;
    color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 3px;
    padding: 2px 8px;
    margin-bottom: 10px;
    margin-right: 8px;
  }

  #feed { display: flex; flex-direction: column; }
  article.entry { padding: 22px 0; border-bottom: 1px solid var(--rule); }
  article.entry:first-child { padding-top: 0; }
  article.entry[data-local-hidden="true"] { display: none; }

  .tag { display: inline-block; font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--rule-strong); border-radius: 2px; color: var(--ink-soft); margin-bottom: 10px; }

  article.entry h2 { font-size: 1.4rem; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
  article.entry .byline { font-style: italic; color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 10px; }
  article.entry .abstract { margin: 0 0 12px; max-width: 62ch; }
  .meta-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
  .keywords { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; color: var(--ink-soft); max-width: 70%; }
  .pubdate { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
  .remove-btn { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.72rem; background: none; border: 1px solid var(--rule-strong); color: var(--danger); border-radius: 3px; padding: 3px 8px; cursor: pointer; margin-left: 10px; }
  .empty-note { font-family: 'Schibsted Grotesk', sans-serif; color: var(--ink-soft); font-size: 0.9rem; padding: 30px 0; }
  .empty-note[data-local-hidden="true"] { display: none; }

  #editor-unlock-btn {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; background: transparent;
    border: 1px solid var(--rule-strong); color: var(--ink-soft); border-radius: 20px;
    padding: 7px 16px; cursor: pointer;
  }
  #editor-unlock-btn:hover { color: var(--ink); }
  .admin-panel { display: none; border: 1px solid var(--rule-strong); background: var(--paper-raised); border-radius: 4px; padding: 18px 20px; margin-bottom: 28px; font-family: 'Schibsted Grotesk', sans-serif; }
  .admin-panel.visible { display: block; }
  .admin-panel h3 { font-family: 'Spectral', serif; font-style: italic; font-weight: 500; margin: 0 0 12px; font-size: 1.1rem; }
  .admin-panel .row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
  .admin-panel label { display: block; font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }
  .admin-panel .field { flex: 1; min-width: 180px; }
  .admin-panel input, .admin-panel select, .admin-panel textarea { width: 100%; font-family: inherit; font-size: 0.88rem; padding: 8px 10px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); border-radius: 3px; }
  .admin-panel textarea { min-height: 70px; resize: vertical; }
  .admin-panel button.submit { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.88rem; background: var(--brand); color: var(--paper-raised); border: none; padding: 10px 18px; border-radius: 3px; cursor: pointer; margin-right: 8px; }
  .admin-panel button.submit:hover { opacity: 0.9; }
  #sync-note { font-size: 0.72rem; color: var(--ink-soft); margin-top: 8px; }
  .remove-btn { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.72rem; background: none; border: 1px solid var(--rule-strong); color: var(--danger); border-radius: 3px; padding: 3px 8px; cursor: pointer; margin-left: 10px; }

  aside.sidebar section, .page-content section { margin-bottom: 30px; font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.88rem; }
  aside.sidebar h3, .page-content h2 { font-family: 'Spectral', serif; font-style: italic; font-weight: 500; font-size: 1.05rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
  .page-content h2 { font-size: 1.6rem; }
  aside.sidebar p, .page-content p { margin: 0 0 10px; color: var(--ink-soft); }
  aside.sidebar ul, .page-content ul { list-style: none; margin: 0; padding: 0; }
  aside.sidebar li, .page-content li { margin-bottom: 9px; color: var(--ink-soft); }
  li .role-name { color: var(--ink); display: block; font-family: 'Spectral', serif; }
  li .role-title { font-size: 0.8rem; }
  a.cta { display: inline-block; margin-top: 4px; font-size: 0.82rem; border-bottom: 1px solid var(--brand); color: var(--brand); text-decoration: none; }

  footer { border-top: 3px double var(--rule-strong); padding: 26px 0 50px; font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; color: var(--ink-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

  /* ---- cover images beside papers ---- */
  article.entry.has-cover { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: start; }
  #featured-slot .entry.has-cover { grid-template-columns: 148px minmax(0, 1fr); gap: 24px; }
  .entry-cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule-strong); background: var(--paper-raised); display: block; }
  @media (max-width: 480px) {
    article.entry.has-cover { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
    #featured-slot .entry.has-cover { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  }

  /* ---- settings page ---- */
  .setting-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .setting-help { font-size: 0.8rem; }
  .editor-status { font-size: 0.82rem; margin: 12px 0 0; }
  .editor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .editor-only { display: none; }
  html[data-local-editor="true"] .editor-only { display: block; }
  #download-btn {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.82rem; background: var(--ink-soft); color: var(--paper-raised);
    border: none; padding: 8px 16px; border-radius: 3px; cursor: pointer;
  }
  #download-btn:hover { opacity: 0.9; }

  /* ---- editorial committee ---- */
  #committee-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; justify-content: start; margin: 0 0 30px; padding: 0; list-style: none; }
  #committee-list:empty { display: none; }
  .member { border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 4px; padding: 0; margin: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
  .member .member-photo { width: 100%; aspect-ratio: 256 / 370; object-fit: cover; object-position: center top; display: block; border-bottom: 1px solid var(--rule); background: var(--paper); }
  .member .member-photo.placeholder { display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-family: 'Spectral', serif; font-size: 2.6rem; letter-spacing: 0.04em; }
  .member .member-info { padding: 12px 14px 14px; }
  .member .member-name { font-family: 'Spectral', serif; font-size: 1.05rem; color: var(--ink); display: block; overflow-wrap: anywhere; }
  .member .member-role { font-size: 0.8rem; color: var(--ink-soft); display: block; margin-top: 2px; }
  .member .member-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
  .member .member-actions .remove-btn { margin: 0; }
  #committee-panel { max-width: 640px; }
  .member .member-edit { display: grid; gap: 8px; }
  .member .member-edit label { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.72rem; color: var(--ink-soft); display: grid; gap: 3px; }
  .member .member-edit input { font: inherit; font-size: 16px; padding: 6px 8px; border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--paper); color: var(--ink); width: 100%; box-sizing: border-box; }
  .member .member-edit-actions { display: flex; gap: 8px; }
  .member .member-edit-actions .remove-btn { margin: 0; }
  .member.editing .member-actions { display: none; }
  .edit-btn { color: var(--ink); }
  .hbtn-edit { display: none; }
  html[data-local-editor="true"] .hbtn-edit { display: inline-flex; }
  #save-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 9px 20px; background: var(--brand-soft); color: var(--ink); border-bottom: 1px solid var(--rule-strong); font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.82rem; text-align: center; }
  #save-bar[hidden] { display: none; }
  #save-bar button { font: inherit; font-size: 0.78rem; background: none; border: 1px solid var(--rule-strong); color: var(--danger); border-radius: 3px; padding: 3px 9px; cursor: pointer; }
  .field .check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin-top: 6px; font-size: 0.85rem; color: var(--ink-soft); }
  .field .check input[type="checkbox"] { width: auto; flex: none; margin: 0; }
  .member .edit-btn { color: var(--ink); }
  .field-hint { font-size: 0.78rem; color: var(--ink-soft); margin: 4px 0 0 !important; }
  #committee-empty { font-style: italic; }
  #committee-list:not(:empty) ~ #committee-empty { display: none; }

  /* ---- reader preferences ---- */
  html[data-local-textsize="small"] { font-size: 14px; }
  html[data-local-textsize="large"] { font-size: 18px; }
  html[data-local-textsize="xlarge"] { font-size: 20px; }

  html[data-local-font="sans"] body,
  html[data-local-font="sans"] :is(aside.sidebar h3, .page-content h2, .page-content h3, .admin-panel h3, .member .member-name, li .role-name) {
    font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
  html[data-local-font="sans"] :is(.masthead h1, .tagline, article.entry h2) { font-weight: 500; }

  html[data-local-density="compact"] body { line-height: 1.4; }
  html[data-local-density="compact"] article.entry { padding: 14px 0; }
  html[data-local-density="compact"] article.entry:first-child { padding-top: 0; }
  html[data-local-density="compact"] #featured-slot .entry { padding: 16px 18px; margin-bottom: 20px; }
  html[data-local-density="compact"] main.layout { padding-top: 24px; }
  html[data-local-density="compact"] main.wrap.single { padding-top: 24px; }
  html[data-local-density="compact"] .page-content section { margin-bottom: 20px; }

  .setting-block { margin-bottom: 22px; }
  .setting-label { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.85rem; color: var(--ink); margin: 0 0 8px !important; }
  #reset-settings {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.78rem; background: transparent;
    border: 1px solid var(--rule-strong); color: var(--ink-soft); border-radius: 20px;
    padding: 7px 16px; cursor: pointer;
  }
  #reset-settings:hover { color: var(--ink); }
  /* ---- paper detail page ---- */
  article.entry h2 a.title-link { text-decoration: none; color: inherit; }
  article.entry h2 a.title-link:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a.cover-link { display: block; }
  a.details-link { margin-right: 18px; }
  .back-link { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; display: inline-block; margin-bottom: 18px; }
  .back-link:hover { color: var(--brand); }
  .paper-head { margin-bottom: 22px; }
  .paper-title { font-size: 1.9rem; font-weight: 600; line-height: 1.25; margin: 4px 0 8px; }
  .paper-byline { font-style: italic; color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
  .tabs { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 6px; padding: 8px; margin-bottom: 20px; font-family: 'Schibsted Grotesk', sans-serif; }
  .tab { background: transparent; border: none; padding: 9px 14px; border-radius: 4px; font-family: inherit; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer; }
  .tab:hover { color: var(--ink); }
  .tab[aria-selected="true"] { background: var(--brand); color: var(--paper-raised); }
  .paper-panel { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 6px; padding: 26px 28px; }
  .panel-title { font-size: 1.45rem; font-weight: 600; margin: 0 0 14px; }
  .paper-abstract { white-space: pre-line; margin: 0 0 16px; max-width: 68ch; }
  .paper-keywords { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
  .paper-keywords strong { color: var(--ink); font-weight: 500; }
  .panel-note { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 12px; }
  .pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--rule); border-radius: 4px; background: #fff; margin-bottom: 12px; display: block; }
  ol.ref-list { margin: 0; padding-left: 1.4em; max-width: 70ch; }
  ol.ref-list li { margin-bottom: 12px; padding-left: 4px; }
  ul.author-list { list-style: none; margin: 0; padding: 0; }
  ul.author-list li { margin-bottom: 16px; }
  ul.author-list .a-name { font-size: 1.05rem; color: var(--ink); display: block; }
  ul.author-list .a-detail { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.84rem; color: var(--ink-soft); display: block; margin-top: 2px; }
  .cite-block { border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; padding: 14px 16px; margin-bottom: 16px; }
  .cite-label { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
  .cite-text { margin: 0 0 10px; overflow-wrap: anywhere; }
  pre.cite-text { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; }
  .copy-btn { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.76rem; background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-soft); border-radius: 3px; padding: 4px 10px; cursor: pointer; }
  .copy-btn:hover { color: var(--ink); }
  aside.sidebar section.info-card { border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 6px; padding: 18px 20px; }
  .info-card h3 { text-transform: none; }
  .info-card dl { margin: 0; }
  .info-card dt { font-size: 0.75rem; color: var(--ink-soft); margin-top: 12px; }
  .info-card dd { margin: 2px 0 0; color: var(--ink); font-size: 0.92rem; overflow-wrap: anywhere; }
  .info-card dd a { color: var(--brand); }
  .card-kicker { font-size: 0.75rem; margin: 0 0 6px !important; }
  .card-journal { font-family: 'Spectral', serif; font-size: 1.02rem; color: var(--ink) !important; margin: 0 0 2px !important; }
  .card-sub { font-size: 0.8rem; margin: 0 !important; }
  .admin-panel[data-local-nopaper="true"] { display: none !important; }
  .admin-panel details { margin: 6px 0 14px; }
  .admin-panel details summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 10px; }
  .admin-panel textarea.tall { min-height: 110px; }
  #details-status { font-size: 0.8rem; color: var(--ink-soft); margin: 8px 0 0; }
  html[data-local-font="sans"] :is(.paper-title, .panel-title, .card-journal) { font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; }

  footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
  footer a:hover { color: var(--brand); }
  .page-content li strong { color: var(--ink); font-weight: 600; }

  /* ---- paper hero (top of a paper page) ---- */
  .paper-hero { background: #1B4784; color: #fff; position: relative; font-family: 'Schibsted Grotesk', sans-serif; }
  #paper-hero:empty { display: none; }
  .paper-hero :focus-visible { outline-color: #fff; }
  .paper-hero-inner { max-width: 1080px; margin: 0 auto; padding: 26px 24px 36px; position: relative; z-index: 1; }
  .crumbs { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; color: rgba(255,255,255,0.72); margin-bottom: 24px; }
  .crumbs a { color: inherit; text-decoration: none; }
  .crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .crumbs .sep { opacity: 0.5; }
  .hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
  .badge-field { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #fff; font-weight: 500; }
  .hero-title { font-family: 'Spectral', serif; font-weight: 700; font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 22px; max-width: 24em; color: #fff; }
  .hero-authors { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; font-family: 'Spectral', serif; font-weight: 600; font-size: 1.12rem; margin-bottom: 14px; }
  .hero-authors svg { opacity: 0.7; }
  .hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.9rem; color: rgba(255,255,255,0.78); margin-bottom: 26px; }
  .hero-meta .dot { opacity: 0.5; }
  .hero-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .hbtn { font: 600 0.92rem 'Schibsted Grotesk', sans-serif; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; min-height: 44px; border-radius: 8px; cursor: pointer; text-decoration: none; border: 1px solid rgba(255,255,255,0.38); background: transparent; color: #fff; }
  .hbtn:hover { background: rgba(255,255,255,0.12); }
  .hbtn-primary { background: #FDFDFC; border-color: #FDFDFC; color: #1A1917; }
  .hbtn-primary:hover { background: #FFFFFF; }
  .tabs { scroll-margin-top: 72px; border-radius: 10px; }
  .tab { border-radius: 8px; }
  .paper-panel { border-radius: 10px; }
  aside.sidebar section.info-card { border-radius: 10px; }
  #paper-side .info-card h3 { font-family: 'Schibsted Grotesk', sans-serif; font-style: normal; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; border-bottom: none; padding-bottom: 0; margin-bottom: 4px; color: var(--ink); }
  html[data-local-font="sans"] :is(.hero-title, .hero-authors) { font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; }

  /* ---- phones and touch screens ---- */
  html { -webkit-text-size-adjust: 100%; }

  @media (max-width: 780px) {
    .wrap { padding-left: 20px; padding-right: 20px; }
    main.layout, main.wrap.single { padding-left: 20px; padding-right: 20px; padding-top: 24px; gap: 32px; }
    .masthead-logo { font-size: 34px; }
    .masthead-rule { width: 240px; }

    header.masthead { padding-top: 24px; }

    /* nav stays on one row and scrolls sideways instead of stacking into three rows */
    nav.primary .navrow { flex-wrap: nowrap; justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    nav.primary .navrow::-webkit-scrollbar { display: none; }
    nav.primary ul { flex-wrap: nowrap; white-space: nowrap; gap: 22px; flex-shrink: 0; }
    nav.primary a { padding: 14px 0; }

    /* 16px inputs stop iOS Safari from zooming in when a field is tapped */
    .controls input[type="search"], .admin-panel input, .admin-panel select, .admin-panel textarea { font-size: 16px; }
    .controls input[type="search"] { flex: 1 1 100%; }

    article.entry h2 { font-size: 1.25rem; }
    #featured-slot .entry { padding: 16px; }
    #featured-slot .entry h2 { font-size: 1.35rem; }
    .keywords { max-width: 100%; }

    /* paper page */
    .paper-title { font-size: 1.5rem; }

    .paper-hero-inner { padding: 20px 20px 28px; }
    .crumbs { margin-bottom: 18px; }
    .hero-authors { font-size: 1rem; gap: 4px 16px; }
    .hero-meta { margin-bottom: 20px; gap: 4px 16px; }
    .hero-meta .dot { display: none; }
    .hbtn { flex: 1 1 auto; padding: 11px 16px; }
    .hbtn-primary { flex: 1 1 100%; }
    .paper-panel { padding: 18px 16px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { white-space: nowrap; flex-shrink: 0; }
    /* phones show one page of an embedded PDF and trap scrolling, so use the native viewer instead */
    .pdf-frame { display: none; }
    .pdf-frame + a.cta { display: block; text-align: center; padding: 14px 16px; margin-top: 0; border: 1px solid var(--brand); border-radius: 6px; background: var(--brand); color: var(--paper-raised); font-size: 0.95rem; }
  }

  @media (max-width: 520px) {
    #committee-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    footer { padding-bottom: 36px; }
  }

  /* comfortable tap targets on touch screens */
  @media (pointer: coarse) {
    .filter-btn, #reset-settings, #editor-unlock-btn, .copy-btn, .tab, .admin-panel button.submit, #download-btn { min-height: 44px; }
    a.cta:not(.pdf-frame + a.cta) { padding: 10px 0; }
    .back-link { padding: 8px 0; }
  }
  /* ---- paper drafts ---- */
  .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .form-actions button.submit { margin-right: 0; }
  .admin-panel button.submit.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
  .draft-status { font-size: 0.8rem; color: var(--ink-soft); }
  .kept-file { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
  .kept-file[hidden] { display: none; }
  .kept-file button { font: inherit; font-size: 0.78rem; width: auto; background: none; border: none; padding: 0; color: var(--danger); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  #drafts-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
  #drafts-box h4 { font-family: 'Spectral', serif; font-style: italic; font-weight: 500; font-size: 1.05rem; margin: 0 0 4px; }
  #drafts-count { font-family: 'Schibsted Grotesk', sans-serif; font-style: normal; font-size: 0.75rem; color: var(--ink-soft); margin-left: 4px; }
  #drafts-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
  #drafts-list:empty { display: none; }
  .draft-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); }
  .draft-item.current { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
  .draft-info { min-width: 0; flex: 1 1 220px; }
  .draft-title { font-family: 'Spectral', serif; font-size: 1rem; color: var(--ink); display: block; overflow-wrap: anywhere; }
  .draft-meta { font-size: 0.75rem; color: var(--ink-soft); display: block; margin-top: 2px; }
  .draft-badge { display: inline-block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); border: 1px solid var(--brand); border-radius: 2px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
  .draft-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .draft-actions button { font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.76rem; width: auto; background: none; border: 1px solid var(--rule-strong); color: var(--ink); border-radius: 3px; padding: 4px 10px; cursor: pointer; }
  .draft-actions button.publish { background: var(--brand); border-color: var(--brand); color: var(--paper-raised); }
  .draft-actions button.danger { color: var(--danger); }
  .drafts-empty { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; margin: 10px 0 0 !important; }
  .drafts-empty[hidden] { display: none; }
  @media (pointer: coarse) { .draft-actions button, .admin-panel button.submit.secondary { min-height: 44px; } }
  /* ---- live saving ---- */
  #save-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-bottom: none; border-top: 1px solid var(--rule-strong); padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px)); }
  #save-bar.error { background: var(--paper-raised); color: var(--danger); border-top-color: var(--danger); }
  #save-bar button[hidden] { display: none; }
  .admin-panel button.submit[disabled] { opacity: 0.6; cursor: wait; }


  /* ---------- launch placeholder (shows only while no papers are public) ---------- */
  .launch-note { display: none; padding: 8px 0 36px; border-bottom: 1px solid var(--rule); max-width: 62ch; }
  #featured-slot:not(:has(article.entry)) ~ #feed:not(:has(article.entry)) ~ .launch-note { display: block; }
  .launch-kicker {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.72rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--brand); margin: 0 0 8px;
  }
  .launch-note h2 { font-size: 1.65rem; font-weight: 500; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
  .launch-note p { margin: 0 0 10px; color: var(--ink-soft); }
  .launch-note a { color: var(--brand); }

  /* ---------- scheduled papers (editors only) ---------- */
  .scheduled-label {
    display: inline-block; font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.7rem;
    letter-spacing: 0.03em; color: var(--ink-soft); border: 1px dashed var(--rule-strong);
    border-radius: 3px; padding: 2px 8px; margin-bottom: 10px;
  }


  /* ---------- wargames ---------- */
  .wg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
  .wg-card { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; min-width: 0; }
  .wg-card.wg-flagship { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
  .wg-status {
    font-family: 'Schibsted Grotesk', sans-serif; font-size: 0.72rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--brand); margin: 0 0 6px;
  }
  .page-content .wg-card h3 { font-family: 'Spectral', serif; font-weight: 500; font-size: 1.35rem; line-height: 1.25; margin: 0 0 8px; color: var(--ink); text-wrap: balance; }
  .wg-facts { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
  .wg-facts dt { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
  .wg-facts dd { margin: 2px 0 0; color: var(--ink); }
  .page-content .wg-steps { counter-reset: wg; }
  .page-content .wg-steps li { counter-increment: wg; position: relative; padding-left: 30px; }
  .page-content .wg-steps li::before { content: counter(wg); position: absolute; left: 0; top: 0; width: 20px; text-align: right; color: var(--brand); font-weight: 600; }
  .page-content li strong { color: var(--ink); }
  .wg-empty { font-style: italic; }

  .wg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin: 4px 0 18px; }
  .wg-stat { border-top: 2px solid var(--brand); padding-top: 10px; }
  .wg-stat-num { display: block; font-family: 'Spectral', serif; font-size: 2rem; line-height: 1.1; color: var(--ink); font-weight: 500; }
  .wg-stat-label { display: block; margin-top: 4px; font-size: 0.8rem; color: var(--ink-soft); }
  .wg-question { font-family: 'Spectral', serif; font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--ink); border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; margin: 6px 0 18px; text-wrap: balance; }
  .page-content .wg-sides { display: grid; gap: 0; border-top: 1px solid var(--rule); }
  .page-content .wg-sides li { display: grid; grid-template-columns: minmax(150px, 0.35fr) 1fr; gap: 16px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--rule); }
  .wg-side-name { color: var(--ink); font-weight: 600; }
  @media (max-width: 560px) { .page-content .wg-sides li { grid-template-columns: 1fr; gap: 4px; } }
  .wg-sources { font-size: 0.75rem; margin-top: 14px; }


/* ---------- crawlable paper pages + issues archive ---------- */
.ssr-paper { font-family: 'Schibsted Grotesk', sans-serif; }
.ssr-paper h1 { font-family: 'Spectral', serif; font-weight: 500; font-size: 2rem; line-height: 1.2; margin: 8px 0; color: var(--ink); }
.ssr-paper h2 { font-family: 'Spectral', serif; font-style: italic; font-weight: 500; font-size: 1.2rem; margin: 26px 0 8px; }
.ssr-paper p, .ssr-paper li { color: var(--ink-soft); }
.ssr-paper .ssr-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); margin: 18px 0 0; }
.page-content .issue-list { border-top: 1px solid var(--rule); }
.page-content .issue-list li { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--rule); }
.page-content .issue-list a { font-family: 'Spectral', serif; font-size: 1.15rem; line-height: 1.3; color: var(--ink); text-decoration: none; }
.page-content .issue-list a:hover { text-decoration: underline; }
.page-content .issue-meta { font-size: 0.82rem; }
.page-content h2 .issue-when { font-style: normal; font-size: 1rem; color: var(--ink-soft); }


/* ---- homepage cards: short abstracts, full text lives on each paper page ---- */
article.entry .abstract { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
#featured-slot article.entry .abstract { -webkit-line-clamp: 5; line-clamp: 5; }


/* ---- per-paper banner colors ---- */
.paper-hero[data-paper="rise-of-the-yuan"] { background: #8B2323; }
.paper-hero[data-paper="planned-economy-and-ai"] { background: #14595A; }
