/* Out of Commission — Ghost theme, Broadsheet edition.
   Matches the OOC job board: paper ground, ink type, hairline rules, Georgia for everything,
   Frankfurter for the page headline only, yellow as the single accent. The artwork carries
   the colour; the chrome stays out of its way. */

@font-face {
    font-family: "Frankfurter Std";
    src: url("../fonts/FrankfurterStd.otf") format("opentype");
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Georgia Web";
    src: local("Georgia"), url("../fonts/Georgia.ttf") format("truetype");
    font-weight: normal; font-style: normal; font-display: swap;
}

:root {
    --paper: #FEFAF0;
    --white: #FFFFFF;
    --cream: #FCEDC9;
    --ink: #221815;
    --ink-soft: #5C4F48;
    --line: rgba(34, 24, 21, 0.15);
    --line-strong: rgba(34, 24, 21, 0.30);
    --yellow: #F5C51F;
    --yellow-deep: #EDBD19;
    --red: #E95B44;
    --blue: #3768C5;
    --font-display: "Frankfurter Std", "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --font: var(--gh-font-body, "Georgia Web", Georgia, "Times New Roman", serif);
    --shell: 1120px;
    --gutter: 24px;
    --column: 680px;
}
@media (min-width: 768px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font); font-size: 16px; line-height: 26px;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(34, 24, 21, 0.4); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
.link-ext { color: var(--blue); text-decoration-color: rgba(55, 104, 197, 0.4); }
.link-ext:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-weight: normal; margin: 0; }
h2, h3, h4 { font-family: var(--font); }
p { margin: 0; }
time { font-variant-numeric: tabular-nums; }
::selection { background: var(--yellow); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type roles — the same names as the board */
.h1 { font-family: var(--font-display); font-size: 32px; line-height: 36px; letter-spacing: -0.02em; color: var(--ink); }
@media (min-width: 768px) { .h1 { font-size: 40px; line-height: 44px; } }
.h1 a { text-decoration: none; }
.h1 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.lede { max-width: 560px; font-size: 17px; line-height: 28px; color: var(--ink-soft); margin-top: 12px; }
.kicker { font-size: 13px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.meta { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.small { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.rule { border-top: 1px solid var(--line); }
.link { color: var(--ink); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px;
    background: var(--yellow); color: var(--ink); border: 1px solid var(--ink); border-radius: 4px;
    font-size: 15px; line-height: 20px; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--yellow-deep); text-decoration: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; margin: 24px 0; }
.btn-secondary { background: transparent; }
.btn-secondary:hover { background: rgba(252, 237, 201, 0.6); }

.field {
    height: 44px; width: 100%; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px;
    background: var(--white); color: var(--ink); font: inherit; font-size: 16px; line-height: 20px;
}
.field::placeholder { color: rgba(92, 79, 72, 0.6); }
.field:focus { border-color: var(--ink); outline: 2px solid rgba(245, 197, 31, 0.6); outline-offset: 0; }

/* Shell */
.site { min-height: 100vh; display: flex; flex-direction: column; }
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.page { flex: 1; padding-top: 40px; padding-bottom: 64px; }
@media (min-width: 768px) { .page { padding-top: 56px; } }

/* Masthead: badge + wordmark, nav, one yellow button; 1px ink rule then 3px yellow rule */
.masthead { position: sticky; top: 0; z-index: 40; background: var(--paper); }
.masthead-bar { border-bottom: 1px solid var(--ink); }
.masthead-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.masthead-accent { height: 3px; background: var(--yellow); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font-size: 17px; line-height: 1; color: var(--ink); }
.nav { display: none; align-items: center; gap: 24px; }
.nav-secondary { margin: 0 auto; }
.nav-secondary a { color: var(--ink); }
.nav a, .nav-link { font-size: 15px; line-height: 20px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav-link:hover, .nav a[aria-current] { color: var(--ink); text-decoration: none; }
.nav-tools { display: none; align-items: center; gap: 24px; margin-left: auto; }
.menu-toggle { margin-left: auto; height: 40px; color: var(--ink); }
@media (min-width: 1280px) {
    .nav, .nav-tools { display: flex; }
    .menu-toggle { display: none; }
}
.mobile-menu { border-bottom: 1px solid var(--line); background: var(--paper); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu li:last-child { border-bottom: 0; }
.mobile-menu li a, .mobile-menu li .nav-link { display: block; padding: 16px 0; font-size: 17px; line-height: 24px; color: var(--ink); text-decoration: none; width: 100%; text-align: left; }
@media (min-width: 1280px) { .mobile-menu { display: none !important; } }

/* Home: the lettering, then the latest issue, then the projects */
.lettering { text-align: center; padding: 8px 0 48px; }
@media (min-width: 768px) { .lettering { padding: 16px 0 56px; } }
.lettering img { width: min(880px, 100%); height: auto; margin: 0 auto; }

.latest { margin-bottom: 48px; }
@media (min-width: 768px) { .latest { margin-bottom: 64px; } }
.latest-body { display: grid; gap: 24px; padding-top: 24px; }
@media (min-width: 1024px) { .latest-body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; align-items: start; } }
.latest-art { min-width: 0; }
.latest-well[hidden] { display: none; }
.latest-well { display: flex; align-items: center; justify-content: center; background: var(--white); border: 1px solid var(--line); padding: 16px; min-height: 240px; max-height: 70vh; }
.latest-well img { max-width: 100%; max-height: calc(70vh - 32px); width: auto; height: auto; object-fit: contain; }
.latest-text .h1 { margin-top: 4px; }
.latest-text .lede { margin-top: 16px; max-width: none; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.hero-actions .link { font-size: 15px; }

/* Pick of the week: the issue's lead project and its credits, under the picture (home) and at
   the foot of each row (issues archive) */
.pick { margin-top: 16px; }
.pick-title { margin-top: 4px; font-size: 17px; line-height: 24px; color: var(--ink); }
.pick-title a { text-decoration: none; }
.pick-title a:hover { text-decoration: underline; }
.pick-credits { margin-top: 2px; }
.pick-credits .facet-type { color: var(--ink-soft); }
.pick-ribbon { width: 12px; height: 12px; vertical-align: -1px; margin-right: 5px; }
.latest-art .pick { text-align: center; }
.latest-art .pick .kicker { font-size: 12px; line-height: 15px; }
.latest-art .pick .pick-title { font-size: 15px; line-height: 22px; }
.latest-art .pick .pick-credits { font-size: 13px; line-height: 18px; }
.latest-art .pick-ribbon { width: 11px; height: 11px; }
/* In the archive the pick sits on the bottom edge of the picture */
.issue-text .pick { margin-top: auto; padding-top: 20px; }

.page-head { padding-bottom: 32px; }
.page-head .lede { max-width: none; }
.page-head .meta, .page-head .lede { margin-top: 12px; }
.page-head .kicker + .h1 { margin-top: 8px; }

/* Centred Frankfurter section title (home: "All Projects") */
.section-title { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-title + .grid { padding-top: 32px; }

/* Section head: a kicker line above a rule, like the board's column header */
.section-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.section-head .kicker a { color: var(--ink); }

/* Project grid: uniform cells, 4:3 wells, nothing cropped */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; padding-top: 24px; }
@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card-well {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 16px;
    background: var(--white); border: 1px solid var(--line); overflow: hidden;
}
.card-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.card-meta { display: block; padding-top: 12px; text-align: center; }
.card-title { display: block; margin-top: 4px; font-size: 17px; line-height: 24px; color: var(--ink); }
.card-title b, .h1 b { font-weight: normal; }
.card-title .for { color: var(--ink-soft); }
.h1 .for { color: var(--ink-soft); }
.card:hover .card-title { text-decoration: underline; text-decoration-color: rgba(34, 24, 21, 0.4); text-underline-offset: 3px; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.pagination a { color: var(--ink); }
.page-number { text-align: center; }

/* Issues index: a ruled list with a large thumbnail per issue, like the board's featured row */
.issue-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.issue-list li { border-bottom: 1px solid var(--line); }
.issue-row { display: grid; gap: 16px; padding: 24px 0; color: var(--ink); }
@media (min-width: 768px) { .issue-row { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; padding: 32px 0; } }
.issue-well { text-decoration: none; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 12px; background: var(--white); border: 1px solid var(--line); overflow: hidden; }
.issue-well img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.issue-text { display: flex; flex-direction: column; }
.issue-title { display: block; margin-top: 6px; font-size: 22px; line-height: 28px; color: var(--ink); text-decoration: none; }
.issue-title:hover, .issue-well:hover + .issue-text .issue-title { text-decoration: underline; text-decoration-color: rgba(34, 24, 21, 0.4); text-underline-offset: 3px; }
.issue-preview { display: block; margin-top: 8px; font-size: 16px; line-height: 26px; color: var(--ink-soft); max-width: 60ch; }

/* Directories */
.filter { display: block; max-width: 400px; margin-top: 24px; }
.directory { list-style: none; margin: 0; padding: 0; columns: 4; column-gap: 24px; border-top: 1px solid var(--line); }
@media (max-width: 1023px) { .directory { columns: 3; } }
@media (max-width: 767px) { .directory { columns: 2; } }
@media (max-width: 479px) { .directory { columns: 1; } }
.directory li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.directory a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; font-size: 15px; line-height: 20px; color: var(--ink); }
.directory a:hover { text-decoration: underline; text-decoration-color: rgba(34, 24, 21, 0.4); text-underline-offset: 3px; }
.count { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 13px; }
.directory-status, .directory-empty { padding-top: 24px; }

/* Articles: a page header, a rule, a reading column */
.article-head { max-width: 820px; }
.article-head .h1 { margin-top: 8px; }
.article-head .lede { margin-top: 12px; }
.filed-line { margin-top: 12px; }
.facet-type { color: var(--ink-soft); }
.article .rule { margin: 32px 0; }
@media (min-width: 768px) { .article .rule { margin: 40px 0; } }

.prose { max-width: var(--column); font-size: 16px; line-height: 26px; }
.prose > * + * { margin-top: 1.25em; }
.prose p + p { margin-top: 0.75em; }
.page-template .prose > p:nth-of-type(-n+2) { font-size: 20px; line-height: 32px; }
.page-template .prose > p:nth-of-type(-n+2) strong, .page-template .prose > p:nth-of-type(-n+2) b { font-weight: normal; }
.page-template .prose > p:nth-of-type(2) + p { margin-top: 1.25em; }
.prose figure, .prose .kg-card { margin-left: 0; margin-right: 0; margin-bottom: 0; }
.prose figure img { width: 100%; }
.prose .kg-image-card + .kg-image-card, .prose .kg-image-card + .kg-gallery-card, .prose .kg-gallery-card + .kg-image-card { margin-top: 8px; }
.prose figcaption { color: var(--ink-soft); font-size: 13px; line-height: 18px; margin-top: 8px; }
.prose .kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.prose .kg-gallery-row { display: flex; gap: 8px; }
.prose .kg-gallery-image { flex: 1 1 0; min-width: 0; }
.prose .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.prose .kg-width-wide { max-width: none; width: 100%; }
.prose .kg-width-full { width: 100vw; margin-left: calc(50% - 50vw); }
.prose .kg-width-full img { width: 100%; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
@media (min-width: 768px) { .prose hr { margin: 48px 0; } }
.prose h2 { font-size: 22px; line-height: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 17px; line-height: 24px; margin-top: 1.4em; }
.prose h3 a { text-decoration: none; }
.prose h3 a:hover { text-decoration: underline; }
.prose blockquote { margin: 0; padding-left: 16px; border-left: 1px solid var(--ink); color: var(--ink-soft); }
.prose .kg-bookmark-card { text-align: left; }

/* Issue body: what the email looked like, as a reading column */
/* Project titles inside an issue: Frankfurter, a size down from the issue's own headline */
.issue-body h3 { font-family: var(--font-display); font-size: 22px; line-height: 26px; letter-spacing: -0.01em; }
@media (min-width: 768px) { .issue-body h3 { font-size: 26px; line-height: 30px; } }
.issue-body h3 a:hover { text-decoration-thickness: 2px; }
.issue-body figure + h3, .issue-body figure + h2 { margin-top: 16px; }
.issue-body h3 + p { margin-top: 8px; color: var(--ink-soft); font-size: 14px; line-height: 20px; }
.issue-body h3 ~ p { font-size: 14px; line-height: 20px; }
.issue-body p a { color: var(--ink); }
.issue-body figure + figure { margin-top: 8px; }
.issue-body p + figure, .issue-body p + .kg-card { margin-top: 40px; }

/* Project body: images, then credits in the meta voice */
.project-body p { font-size: 14px; line-height: 20px; color: var(--ink-soft); }
.project-body p a { color: var(--ink); }
.project-body figure + p { margin-top: 16px; }

.more { margin-top: 48px; }
@media (min-width: 768px) { .more { margin-top: 64px; } }

.pager { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 4px; max-width: 45%; text-decoration: none; font-size: 15px; line-height: 20px; color: var(--ink); }
.pager a:hover { text-decoration: underline; text-decoration-color: rgba(34, 24, 21, 0.4); text-underline-offset: 3px; }
.pager-next { margin-left: auto; text-align: right; }
@media (max-width: 599px) { .pager a { max-width: 100%; } .pager-next { margin-left: 0; text-align: left; } }

.page-feature { margin: 24px 0 0; max-width: var(--column); }

/* Footer: an ink rule, the lettering, the blurb, one even line of underlined links */
.footer { margin-top: 96px; border-top: 1px solid var(--ink); }
.footer-inner { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 64px; font-size: 14px; line-height: 20px; color: var(--ink-soft); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 48px; } }
.footer-lettering { width: min(320px, 100%); height: auto; }
.footer-blurb { margin-top: 20px; max-width: 480px; color: var(--ink); font-size: 15px; line-height: 22px; }
.footer-fine { margin-top: 8px; max-width: 480px; }
.footer-side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .footer-side { align-items: flex-end; text-align: right; } }
.footer-credit { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 6px; }
.footer-nav a { color: var(--ink); font-size: 15px; line-height: 20px; }

/* Ghost portal / members bits inherit the type */
.gh-portal-triggerbtn-container { display: none; }

/* Ghost bookmark card, in the same voice as a list row */
.kg-bookmark-card { width: 100%; }
.kg-bookmark-container { display: flex; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--white); }
.kg-bookmark-container:hover { text-decoration: none; border-color: var(--line-strong); }
.kg-bookmark-content { display: flex; flex-direction: column; flex-grow: 1; padding: 16px 20px; min-width: 0; }
.kg-bookmark-title { font-size: 17px; line-height: 24px; color: var(--ink); }
.kg-bookmark-description { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kg-bookmark-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.kg-bookmark-icon { width: 16px; height: 16px; }
.kg-bookmark-author { color: var(--ink); }
.kg-bookmark-publisher { color: var(--ink-soft); }
.kg-bookmark-publisher::before { content: "·"; margin-right: 8px; }
.kg-bookmark-thumbnail { position: relative; flex-shrink: 0; width: 200px; min-height: 120px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .kg-bookmark-container { flex-direction: column; } .kg-bookmark-thumbnail { width: 100%; aspect-ratio: 4 / 3; } }
