/* Catrina: page CSS on top of system.css (one shared design system). */

/* 1024 to 1180: "Editorial board" and "Contact" run under the submit button */
@media (min-width: 1024px) and (max-width: 1180px) {
  .nav__bar { display: flex; align-items: center; gap: var(--s-3); }
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__toggle {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn);
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); cursor: pointer; flex: none;
  }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; position: fixed; top: var(--nav); left: 0; right: 0; bottom: 0;
    z-index: 40; padding: var(--s-4) var(--gut) var(--s-9); background: var(--bg); overflow-y: auto; gap: 0;
  }
  .nav.is-open .nav__item { display: grid; height: auto; border-bottom: 1px solid var(--line); }
  .nav.is-open .nav__link { height: 56px; padding: 0; font-size: 20px; background: none; }
  .nav.is-open .nav__link::before { display: none; }
  .nav.is-open .nav__menu { position: static; display: none; }
  .nav.is-open .nav__item.is-expanded .nav__menu { display: block; }
  body.nav-locked { overflow: hidden; }
}

/* client-supplied journal data: plain text, kept editable in one place */
[data-client] { font-variant-numeric: tabular-nums; }

/* picture-develops: the section's one photograph, as tall as the text beside it */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(600px, var(--ly-fit, 600px)); background: var(--surface); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }

/* a photograph frame in a split */
.photo { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.photo > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }

/* a short window: sections were locked to one screen, so the services list and its
   photograph ran out of the section, under the header and over the footer */
@media (min-width: 1024px) {
  main > section.section,
  footer.closing {
    height: auto;
    min-height: calc(var(--h, 1) * 100svh);
  }
  main > section.section > :is(.wrap, .container),
  footer.closing > .wrap { height: auto; min-height: 0; }
  main > section.section > :is(.wrap, .container) > :is(.fill, .grid) {
    flex: 1 0 auto; min-height: auto; overflow: visible;
  }
  .photo.frame--fill { position: relative; align-self: stretch; height: auto; min-height: 280px; }
  .photo.frame--fill > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
}

@media (max-width: 1023px) { .grid > .photo.frame--fill { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }
@media (max-width: 639px) { #scope .photo.frame--fill { aspect-ratio: 2 / 3; } #process .develop { aspect-ratio: 4 / 5; } }

/* the scope and process lists */
.rows > li > p { margin: 0; color: var(--ink); }
.rows--steps > li { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
.rows--steps .step-n { grid-row: span 2; font-family: var(--font-display); font-size: 24px; line-height: 26px; color: var(--accent); font-variant-numeric: tabular-nums; }
.rows--steps .rows__name, .rows--steps > li > p { grid-column: 2; }

/* embedded backend pages: one frame style for every iframe */
.frame.embed { position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.frame.embed > * { position: relative; }
.embed > iframe { display: block; width: 100%; height: var(--embed-h, 720px); border: 0; background: transparent; position: relative; z-index: 1; }
.embed__status { margin: 0 0 var(--s-3); font-size: var(--t-small); color: var(--muted); }
.embed__status[hidden] { display: none; }
.embed__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); background: var(--bg); font-size: var(--t-small); color: var(--muted); position: relative; z-index: 2; }
.embed__bar strong { color: var(--ink); font-weight: 500; }
@media (max-width: 639px) { .embed > iframe { height: var(--embed-h-sm, var(--embed-h, 720px)); } }

/* journal information: small hairline cards */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); align-content: start; }
.info-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); padding: var(--s-5); }
.info-card h3 { font-family: var(--font-text); font-size: var(--t-body); font-weight: 500; margin: 0 0 var(--s-3); }
.info-card dl { margin: 0; display: grid; gap: var(--s-2); }
.info-card dl > div { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--t-body); line-height: 1.5; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; text-align: right; }
.info-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); line-height: 1.5; }
@media (max-width: 639px) { .info-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } }

/* issue chips: one link per issue */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.chips a { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font-variant-numeric: tabular-nums; font-size: var(--t-small); font-weight: 500; transition: background-color var(--dur, 150ms) var(--ease), border-color var(--dur, 150ms) var(--ease), color var(--dur, 150ms) var(--ease); }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips a:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

.scope__more { margin-top: var(--s-5); }
.services__label { margin: 0 0 var(--s-3); }
.chips--issues { margin-bottom: var(--s-6); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.chips--issues a { min-width: 0; width: 100%; }
@media (max-width: 639px) { .chips--issues { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rows--links > li { align-items: center; padding-block: var(--s-3); }
.rows--links .rows__name { width: max-content; }
.rows--links .rows__value { color: var(--muted); }
@media (max-width: 639px) {
  .rows--links > li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rows--links .rows__value { grid-column: 1; grid-row: 2; justify-self: start; text-align: left; white-space: nowrap; font-size: var(--t-small); }
}

/* journal information: four open spec columns, then one photograph across the wrap */
.spec .t-label { margin: 0 0 var(--s-3); }
.rows--spec > li { padding-block: var(--s-3); }
.rows--spec .rows__name { font-weight: 400; color: var(--muted); }
.rows--spec .rows__value { color: var(--ink); }
.rows--spec > li:only-child, .rows--spec .rows__name:only-child { color: var(--ink); }
.journal__band { margin-top: var(--s-7); height: 240px; }
@media (max-width: 1023px) { .journal__band { height: 200px; } }
@media (max-width: 639px) { .journal__band { height: 360px; } .rows--spec > li { padding-block: var(--s-2); } .specs { row-gap: var(--s-5); } }

/* the footer's mark: the initial tile at the name's cap height */
.footer__mark .mark.mark--initial { font-size: 0.42em; width: 1.75em; height: 1.75em; line-height: 1; margin-right: 0.3em; overflow: visible; }

/* linked service cards */
.link-card { text-decoration: none; }
.link-card h3 { font-family: var(--font-text); }
.link-card .card__link { color: var(--accent); }

/* the archive: one row per year */
.years { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.year { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--s-4) var(--s-6); align-items: center; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.year__label { display: grid; gap: 2px; }
.year__label b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; }
.year__label span { font-size: var(--t-small); color: var(--muted); }
.year .chips { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.year .chips a { min-width: 0; width: 100%; }
.year--current { background: var(--p-surface); border-radius: var(--r-md); margin-inline: calc(-1 * var(--s-5)); padding-inline: var(--s-5); border-bottom-color: transparent; }
.year--current .chips a { border-color: color-mix(in oklab, var(--accent) 35%, var(--line)); }
.year__tag { display: inline-block; width: max-content; margin-top: var(--s-2); padding: 2px var(--s-2); border-radius: var(--r-sm); background: var(--p-accent); color: var(--p-accent-ink); font-size: var(--t-label); font-weight: 500; }
.chips a.is-tracker { color: var(--muted); background: transparent; border-style: dashed; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: 0 0 var(--s-6); padding: 0; list-style: none; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 1023px) { .year .chips { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 639px) { .year { grid-template-columns: minmax(0, 1fr); } .year--current { padding-inline: var(--s-4); } }

/* the submission checklist */
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: rule; border-top: 1px solid var(--line); }
.checklist > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.checklist > li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 6px; background: var(--p-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23195c4d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--line)); }
.checklist b { font-weight: 500; }
.confirm { display: grid; gap: var(--s-5); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--p-surface); }
.confirm__line { display: flex; gap: var(--s-3); align-items: flex-start; margin: 0; font-size: var(--t-lead); line-height: 1.5; }
.confirm__line input { width: 22px; height: 22px; margin-top: 4px; accent-color: var(--accent); flex: none; }

/* the policy and prose pages */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose p, .prose li { line-height: 1.7; }
.prose ul { padding-left: 1.2em; display: grid; gap: var(--s-3); }
.policy-block + .policy-block { margin-top: var(--s-8); }
.policy-block h2 { font-size: var(--t-h3); margin-bottom: var(--s-4); }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); position: static; }
.toc a { color: var(--ink); }

/* the editorial board */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.person-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); padding: var(--s-5); display: grid; gap: var(--s-2); }
.person-card .t-label { color: var(--muted); }
.person-card .name { font-family: var(--font-display); font-size: 22px; line-height: 1.25; }
.person-card--lead { grid-column: 1 / -1; background: var(--p-surface); }
@media (max-width: 1023px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .people { grid-template-columns: minmax(0, 1fr); } }

/* the twelve months of a volume */
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.months li { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s-3) var(--s-2); text-align: center; background: var(--bg); display: grid; gap: 2px; }
.months b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; }
.months span { font-size: var(--t-label); color: var(--muted); }
@media (max-width: 1023px) { .months { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 639px) { .months { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* contact details */
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.contact-list span:first-child { color: var(--muted); }
@media (max-width: 639px) { .contact-list li { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); } }

/* inner pages: the words flow; the screen rule holds on the home page */
html[data-page="inner"] main > :is(section, .section) { height: auto; min-height: 0; }
html[data-page="inner"] main > .hero.hero--page { height: auto; min-height: 0; padding-bottom: var(--s-9); }
html[data-page="inner"] .hero--page > .wrap { height: auto; display: block; }
.hero--page .hero__grid { align-items: start; }
.hero--page .develop { height: 380px; }
.hero--page .hero__lead { max-width: 52ch; }
.crumbs { display: flex; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; list-style: none; font-size: var(--t-small); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); }
html[data-page="inner"] main > section.section { padding-top: var(--s-9); padding-bottom: var(--s-9); }
html[data-page="inner"] main > .hero--page + section.section:not(.ground-surface) { padding-top: var(--s-6); }
@media (max-width: 1023px) { .hero--page .develop { height: auto; aspect-ratio: 16 / 9; } }
@media (max-width: 639px) { html[data-page="inner"] main > section.section { padding-top: var(--s-8); padding-bottom: var(--s-8); } }

/* the close's photograph in the dark footer */
.close--photo .close__media { position: relative; overflow: hidden; border-radius: var(--r-lg); flex: 1 1 auto; min-height: 160px; }

/* the nav: six words between the name and the main action on a small laptop */
@media (min-width: 1024px) and (max-width: 1279px) { .nav__link { font-size: 14px; padding: 0 6px; } }

/* the closing band is locked to one screen; on a short window the submit button covers the columns */
@media (min-width: 1280px) {
  footer.footer.closing {
    height: auto;
    min-height: calc(var(--h, 1) * 100svh);
    display: flex;
    flex-direction: column;
  }
  footer.footer.closing > .wrap {
    flex: 1 0 auto;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--s-8);
  }
  footer.footer.closing :is(.closing__cta, .closing__links) { flex: 0 0 auto; min-height: auto; }
}
/* Catrina article, calendar and source-record components */
.people--chief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639px) { .people--chief { grid-template-columns: minmax(0, 1fr); } }
.article-list > li { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
.article-list .rows__name { max-width: 82ch; line-height: 1.45; }
.issue-note { margin-top: var(--s-6); max-width: 760px; }
.issue-note p { margin: 0 0 var(--s-2); line-height: 1.55; }
.months a { display: grid; gap: 3px; color: var(--ink); text-decoration: none; }
.months li:has(a:hover), .months li:has(a:focus-visible) { border-color: var(--accent); }
.archive-list li { grid-template-columns: 120px minmax(0, 1fr) minmax(170px, auto); align-items: center; }
.archive-list li span:first-child { color: var(--ink); font-family: var(--font-display); font-size: 24px; }
[data-confirm-link][aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.footer__legal > span:last-child { display: flex; flex-wrap: wrap; gap: var(--s-2); }
@media (max-width: 639px) {
  .archive-list li { grid-template-columns: minmax(0, 1fr); }
  .article-list .rows__name { overflow-wrap: anywhere; }
  .footer__legal > span:last-child { display: block; }
}

