/* ==========================================================================
   Public site styles - news
   A broadsheet in the manner of a big-city daily: a centered masthead
   between heavy and hairline rules, a sections bar, serif headlines and
   body copy, a gothic sans for kickers and bylines, drop caps, and column
   rules between teasers. Loaded on its own by base_public.html, so the
   variables must be defined here.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Libre+Franklin:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap");

:root {
    --paper: #fbfaf6;
    --paper-2: #f3f0e8;
    --ink: #121212;
    --ink-soft: #333;
    --muted: #666;
    --faint: #999;
    --rule: #121212;
    --hairline: #dcd8ce;
    --link: #326891;
    --link-dark: #1f4566;
    --alert: #b3001b;

    --radius: 0;
    --content-width: 1160px;
    --font-mast: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-sans: "Libre Franklin", "Franklin Gothic Book", "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    line-height: 1.15;
    color: var(--ink);
}

h1, h2, h3 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* h4 and smaller are kickers: small capitals in the sans */
h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 { font-size: 2.8rem; font-weight: 900; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 0.8rem; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--link-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

::selection {
    background: #d9e6f0;
    color: var(--ink);
}

hr {
    border: 0;
    border-top: 1px solid var(--hairline);
    margin: 2rem 0;
}

blockquote {
    margin: 1.5em 0;
    padding: 0 0 0 1.25rem;
    font-family: var(--font-head);
    font-size: 1.4em;
    font-style: italic;
    line-height: 1.3;
    border-left: 4px solid var(--rule);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--paper);
    background: var(--ink);
}

.skip-link:focus {
    top: 0;
    color: var(--paper);
}

/* --------------------------------------------------------------------------
   Header: centered masthead, edition line, sections bar
   -------------------------------------------------------------------------- */

header {
    position: relative;   /* the mega menu positions against the header */
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "brand"
        "tagline"
        "nav";
    justify-items: center;
    padding: 1.4rem max(1.5rem, calc((100% - var(--content-width)) / 2)) 0;
    background: var(--paper);
}

.header_text {
    grid-area: brand;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding-bottom: 0.9rem;
}

.menulogo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin: 0;
}

.menuheader {
    margin: 0;
    font-family: var(--font-mast);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-align: center;
}

/* edition line: hairline over heavy rule, tagline between them */
.menutagline {
    grid-area: tagline;
    justify-self: stretch;
    margin: 0;
    padding: 0.4rem 0;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-align: center;
    color: var(--ink-soft);
    border-top: 1px solid var(--rule);
    border-bottom: 3px double var(--rule);
}

.menutagline:empty {
    padding: 0;
    height: 5px;
}

/* --------------------------------------------------------------------------
   Sections bar + CSS-only mega menu
   -------------------------------------------------------------------------- */

header nav {
    grid-area: nav;
    justify-self: stretch;
    border-bottom: 1px solid var(--rule);
}

header nav > ul.container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav > ul.container > li {
    position: static;
    padding: 0.6rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
}

header nav > ul.container > li > a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--ink);
}

header nav > ul.container > li:hover > a,
header nav > ul.container > li:focus-within > a,
header nav > ul.container > li > a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* Font Awesome isn't loaded on public pages; draw the marker in CSS */
header nav .fa {
    display: none;
}

header nav li.dropdowner > a::after {
    content: "";
    width: 0.35em;
    height: 0.35em;
    margin: -0.15em 0 0 0.15em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

header nav li.dropdowner:hover > a::after,
header nav li.dropdowner:focus-within > a::after {
    transform: rotate(225deg) translate(-0.15em, -0.15em);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 max(1.5rem, calc((100% - var(--content-width)) / 2));
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s ease, visibility 0.15s;
}

li.dropdowner:hover > .mega-menu,
li.dropdowner:focus-within > .mega-menu {
    visibility: visible;
    opacity: 1;
}

.mega-menu > .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0 2rem;
    margin: 0;
    padding: 1.5rem 0 1.75rem;
    background: var(--paper);
    border-bottom: 3px solid var(--rule);
    box-shadow: 0 18px 24px -18px rgba(0, 0, 0, 0.25);
}

.mega-menu .item {
    padding: 0 0 0.5rem;
}

.mega-menu .item h3 {
    margin: 0 0 0.5rem;
    padding-top: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    border-top: 1px solid var(--rule);
}

.mega-menu .item h3 a {
    color: inherit;
}

.mega-menu .item h3 a:hover {
    color: var(--link);
}

.mega-menu .item ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu .item li {
    display: block;
    padding: 0.2rem 0;
    font-family: var(--font-head);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
}

.mega-menu .item li a {
    color: var(--ink);
}

.mega-menu .item li a:hover {
    color: var(--link);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.indent {
    margin-left: 1.5rem;
}

/* page headline */
.page_title {
    padding: 0 0 1rem;
    text-align: center;
    border-bottom: 1px solid var(--hairline);
}

.page_title h2 {
    max-width: 22ch;
    margin: 0 auto;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* the lead photo */
.background_image {
    display: block;
    width: 100%;
    height: clamp(220px, 36vw, 460px);
    object-fit: cover;
}

.sectionheader {
    display: none;
}

/* --------------------------------------------------------------------------
   Cards: the article well
   -------------------------------------------------------------------------- */

.card {
    position: relative;
    max-width: 720px;   /* a readable measure, centered like a story page */
    width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.card + .card {
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--hairline);
}

.card .card {
    max-width: none;
    padding: 1.5rem 0 0;
}

.card h2 {
    margin-top: 2.25rem;
    font-size: 1.9rem;
}

.card h2:first-child {
    margin-top: 0;
}

/* an empty heading is a section break: three centered stars */
.card h2:empty {
    margin: 0 0 1.75rem;
    text-align: center;
}

.card h2:empty::after {
    content: "\2605  \2605  \2605";
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.6em;
    color: var(--ink);
}

.card h3 {
    margin-top: 1.75rem;
    font-size: 1.35rem;
}

.card h3:first-child {
    margin-top: 0;
}

.card h4 {
    margin-top: 1.5rem;
    color: var(--ink-soft);
}

/* drop cap on the story's first paragraph */
.card > p:first-of-type::first-letter {
    float: left;
    margin: 0.06em 0.08em 0 0;
    font-family: var(--font-head);
    font-size: 4.1em;
    font-weight: 900;
    line-height: 0.82;
    color: var(--ink);
}

.card > p:last-child {
    margin-bottom: 0;
}

.card ul {
    padding-left: 1.25rem;
}

.card li {
    margin-bottom: 0.35rem;
}

.card li::marker {
    color: var(--ink);
}

.card.centered {
    max-width: 660px;
}

/* --------------------------------------------------------------------------
   Content grid (child pages): teasers with column rules
   -------------------------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem 2.5rem;
    padding-top: 1rem;
    border-top: 3px double var(--rule);
    overflow: hidden;   /* clips the rule left of the first column */
}

.grid__item {
    position: relative;
    display: flex;
}

/* vertical column rule halfway into the gap */
.grid__item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1.25rem;
    border-left: 1px solid var(--hairline);
}

.grid__item > .card {
    display: flex;
    flex-direction: column;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.card__img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card__header {
    margin: 0 0 0.45rem;
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: -0.01em;
}

.card__header a {
    color: var(--ink);
}

.card__header a:hover {
    color: var(--ink-soft);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.card__text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.true_bullet {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

form table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.6rem;
    text-align: left;
}

form td,
form th {
    padding: 0.25rem 0.6rem;
    vertical-align: middle;
}

form td:first-child,
form th {
    width: 1%;
    white-space: nowrap;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="phone"],
input[type="tel"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid #b8b4aa;
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
textarea:hover {
    border-color: var(--ink-soft);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--link);
}

textarea {
    min-height: 140px;
    resize: vertical;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
}

input[type="checkbox"] {
    width: 1.05em;
    height: 1.05em;
    margin: 0 0.5rem 0 0;
    vertical-align: -0.15em;
    accent-color: var(--ink);
    cursor: pointer;
}

input[type="checkbox"] + label {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
}

/* buttons: the black "Subscribe" button */
button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

button:hover,
.button:hover {
    color: #fff;
    background: var(--link);
    border-color: var(--link);
    text-decoration: none;
}

button:active,
.button:active {
    background: var(--link-dark);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

/* Login page: the bare .centered wrapper becomes a sign-in box over the photo */
.main > .background_image + .centered {
    position: relative;
    max-width: 460px;
    padding: 2.25rem 2.25rem 2rem;
    background: var(--paper);
    border-top: 4px double var(--rule);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    grid-area: 1 / 1;
    width: calc(100% - 2rem);
    margin: 2rem 0;
}

.main > .background_image + .centered h2 {
    margin-bottom: 1rem;
    font-weight: 900;
}

.main > .background_image + .centered table {
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Login page: main fills the viewport between header and footer; the image
   fills main and the panel is centered over it both ways */
body:has(> .main > .background_image + .centered) {
    display: flex;
    flex-direction: column;
}

.main:has(> .background_image + .centered) {
    flex: 1 0 auto;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
}

.main > .background_image:has(+ .centered) {
    grid-area: 1 / 1;
    align-self: stretch;
    justify-self: stretch;
    height: 100%;
    contain: size;      /* the image's natural size never stretches the page */
}

/* --------------------------------------------------------------------------
   Privacy policy
   -------------------------------------------------------------------------- */

.privacy ul {
    margin-left: 2em;
}

.privacy table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    border-top: 3px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.privacy th,
.privacy td {
    text-align: left;
    vertical-align: top;
    padding: 0.5em 0.7em;
    border-bottom: 1px solid var(--hairline);
}

.privacy th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom-color: var(--rule);
}

.privacy .summary {
    padding: 1em 1.25em;
    margin: 1em 0;
    background: var(--paper-2);
    border-left: 4px solid var(--rule);
}

.privacy .table-wrap {
    overflow-x: auto;
}

/* --------------------------------------------------------------------------
   Footer + sitemap
   -------------------------------------------------------------------------- */

.footer {
    margin-top: 1rem;
    color: var(--muted);
}

.footer .card {
    background: transparent;
}

.site-footer {
    margin-top: 4rem;
    color: var(--ink-soft);
    background: var(--paper);
    border-top: 3px double var(--rule);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 2rem 3rem;
    width: min(var(--content-width), calc(100% - 3rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.site-footer__brand {
    text-align: left;
}

.site-footer__brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 0.6rem;
}

.site-footer__brand p {
    margin: 0;
    font-family: var(--font-mast);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.site-footer a {
    color: var(--ink);
}

.site-footer a:hover {
    color: var(--link);
}

.site-footer__bar {
    border-top: 1px solid var(--rule);
}

.site-footer__bar .horizontal {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.site-footer__bar .horizontal ul {
    justify-content: space-between;
}

.site-footer__bar small {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--muted);
}

.site-footer__links {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-sans);
    font-size: 0.78rem;
}

.horizontal ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.horizontal li {
    margin: 0;
}

.horizontal h4 {
    margin: 0;
    font-size: 0.72rem;
    color: var(--muted);
}

.sitemap-nav h2 {
    margin: 0 0 1rem;
    padding-top: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-top: 3px solid var(--rule);
}

.sitemap {
    column-count: 4;
    column-gap: 2rem;
    column-rule: 1px solid var(--hairline);
}

.sitemap ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap > ul > li {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.sitemap > ul > li > a,
.sitemap > ul > li > span {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
}

.sitemap ul ul {
    margin-top: 0.25rem;
}

.sitemap ul ul li {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    margin: 0.15rem 0;
}

.sitemap ul ul ul {
    padding-left: 0.75rem;
}

.sitemap ul ul ul li {
    font-size: 0.8rem;
}

.sitemap span {
    color: var(--muted);
}

.sitemap a {
    color: var(--ink-soft);
}

.sitemap a:hover {
    color: var(--link);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
    header nav > ul.container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    header nav > ul.container > li {
        white-space: nowrap;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .sitemap {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }

    header {
        padding-top: 1rem;
    }

    .header_text {
        padding-bottom: 0.6rem;
    }

    .menulogo {
        width: 38px;
        height: 38px;
    }

    .menutagline {
        font-size: 0.65rem;
    }

    .main {
        padding: 1.75rem 1rem 3rem;
    }

    .main > .background_image + .centered {
        padding: 2rem 1.5rem 1.5rem;
    }

    /* stack form label/field pairs */
    form table,
    form tbody,
    form tr,
    form td,
    form th {
        display: block;
        width: 100% !important;
    }

    form td:first-child:empty {
        display: none;
    }

    .site-footer__inner {
        width: calc(100% - 2rem);
    }

    .site-footer__bar .horizontal ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .sitemap {
        column-count: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* who is signed in, at the top of every page */
.account-bar{display:flex; align-items:center; gap:12px; padding:3px 12px; flex:none;
  font-family:var(--font-sans); background:var(--paper-2); border-bottom:1px solid var(--hairline); color:var(--muted); font-size:12px}
.account-bar .spacer{flex:1}
.account-bar strong{color:var(--ink); font-weight:650}
.account-bar-email{color:var(--muted)}
.account-bar a{padding:1px 8px; font-size:11px; font-weight:600; color:var(--ink); background:#fff;
  border:1px solid #b8b4aa; border-radius:var(--radius); text-decoration:none}
.account-bar a:hover{border-color:var(--ink); color:var(--ink)}

/* Login page: failed-login message */
.login-error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--alert);
    background: #fff;
    border: 1px solid var(--alert);
    border-left: 4px solid var(--alert);
    text-align: left;
}
.login-error p { margin: 0; }
