
/* Ensure the HTML hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }
:root {
  --ink: #17211d;
  --muted: #66716c;
  --paper: #f5f2eb;
  --surface: #fffdf8;
  --line: #d9d4c8;
  --accent: #a24b32;
  --accent-dark: #75311f;
  --green: #315d4d;
  --shadow: 0 18px 50px rgba(30, 37, 32, 0.08);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, rgba(162, 75, 50, 0.07), transparent 30rem), var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button:disabled { cursor: wait; opacity: .58; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.optional { color: var(--muted); font-size: .85em; font-weight: 400; }

.masthead { border-bottom: 1px solid rgba(255,255,255,.16); background: var(--ink); color: #fff; }
.masthead__inner { max-width: 1320px; min-height: 88px; margin: 0 auto; padding: 16px 30px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 50px; height: 50px; border: 1px solid rgba(255,255,255,.65); display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.brand h1 { margin: 0; font-size: 24px; line-height: 1.05; font-weight: 720; letter-spacing: -.025em; }
.brand p { margin: 5px 0 0; color: rgba(255,255,255,.66); font-size: 12px; }
.top-nav { display: flex; gap: 20px; }
.top-nav a { color: rgba(255,255,255,.76); text-decoration: none; font-size: 12px; font-weight: 650; }
.top-nav a:hover { color: #fff; }
.masthead__meta { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.72); font-size: 12px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6dd6a6; box-shadow: 0 0 0 5px rgba(109,214,166,.12); }

main { max-width: 1320px; margin: 0 auto; padding: 0 30px 70px; }
.hero { min-height: 285px; padding: 66px 0 50px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 52px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hero h2 { max-width: 900px; margin: 0; font-size: clamp(42px, 5vw, 70px); line-height: .99; font-weight: 720; letter-spacing: -.052em; }
.hero__copy { max-width: 720px; margin: 23px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero__stat { min-width: 185px; padding: 22px 0 4px; border-top: 2px solid var(--ink); }
.hero__stat strong { display: block; font-size: 46px; line-height: 1; font-weight: 720; letter-spacing: -.05em; }
.hero__stat span { display: block; max-width: 170px; margin-top: 8px; color: var(--muted); font-size: 12px; }

.toolbar { position: sticky; top: 0; z-index: 20; margin: 0 -14px; padding: 15px 14px; display: grid; grid-template-columns: minmax(250px, 1.8fr) repeat(3, minmax(125px, .75fr)) minmax(145px, .85fr) auto; gap: 9px; background: rgba(245, 242, 235, .94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.search-box { position: relative; }
.search-box span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; }
.search-box input, select, input[type="email"], input[type="text"], textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); outline: none; }
.search-box input, select, input[type="email"], input[type="text"] { min-height: 45px; }
.search-box input { padding: 0 14px 0 42px; }
select { padding: 0 35px 0 12px; }
textarea { padding: 12px 13px; resize: vertical; }
input[type="email"], input[type="text"] { padding: 0 13px; }
.search-box input:focus, select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(162,75,50,.1); }
.button { min-height: 44px; border: 0; border-radius: 6px; padding: 0 17px; cursor: pointer; font-weight: 740; transition: transform .16s ease, opacity .16s ease, background .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button--quiet { background: transparent; color: var(--muted); }
.button--primary { background: var(--ink); color: #fff; }
.button--link { display: inline-flex; align-items: center; text-decoration: none; }

.feed-header { padding: 48px 0 20px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.feed-header h3, .newsletter-strip h3 { margin: 0; font-size: 34px; line-height: 1; font-weight: 720; letter-spacing: -.035em; }
#result-status { color: var(--muted); font-size: 12px; }
.feed { display: grid; gap: 18px; }
.article-card { min-height: 268px; display: grid; grid-template-columns: 345px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 8px 26px rgba(30,37,32,.035); transition: box-shadow .2s ease, transform .2s ease; }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.article-card__image-link { position: relative; min-height: 268px; overflow: hidden; background: #ded9cd; }
.article-card__image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.article-card:hover .article-card__image { transform: scale(1.025); }
.article-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; line-height: 1; font-weight: 750; letter-spacing: -.04em; color: rgba(23,33,29,.18); background: linear-gradient(135deg, #e3ded3, #cbc5b7); }
.article-card__body { padding: 24px 28px 22px; display: flex; flex-direction: column; }
.article-card__topline { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; background: #eee8dc; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.badge--category { color: var(--accent-dark); background: #f1dfd8; }
time { white-space: nowrap; color: var(--muted); font-size: 11px; }
.article-card__title-link { text-decoration: none; }
.article-card__title { margin: 17px 0 10px; font-size: clamp(24px, 2.25vw, 34px); line-height: 1.08; font-weight: 720; letter-spacing: -.035em; }
.article-card__excerpt { margin: 0; color: #53605a; font-size: 14px; line-height: 1.58; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.translation-panel { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--accent); background: #f5eee9; }
.translation-panel span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.translation-panel h5 { margin: 7px 0 5px; font-size: 19px; line-height: 1.2; font-weight: 720; }
.translation-panel p { margin: 0; color: #5d645f; font-size: 12px; line-height: 1.5; }
.article-card__footer { margin-top: auto; padding-top: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.source-line { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.source-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 760; }
.source-language { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
.translate-button, .report-link { border: 0; border-bottom: 1px solid currentColor; padding: 2px 0; background: none; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 740; text-decoration: none; }
.translate-button[disabled] { opacity: .45; cursor: default; }
.report-link { color: var(--muted); }
.read-link { color: var(--ink); text-decoration: none; font-size: 11px; font-weight: 760; }
.load-more-wrap { padding: 28px 0 0; text-align: center; }
.empty-state { padding: 70px 30px; border: 1px dashed var(--line); background: rgba(255,253,248,.48); text-align: center; color: var(--muted); }

.newsletter-strip { margin-top: 70px; padding: 34px; display: grid; grid-template-columns: 1fr minmax(320px, .9fr); gap: 44px; align-items: center; border: 1px solid var(--line); background: var(--surface); }
.newsletter-strip p { color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.inline-form .consent-row, .inline-form .form-status { grid-column: 1 / -1; }
.consent-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; }
.consent-row input { margin-top: 3px; }
.form-status { min-height: 20px; margin: 5px 0 0; color: var(--accent-dark); font-size: 12px; }

.site-footer { background: var(--ink); color: #fff; padding: 48px max(30px, calc((100vw - 1260px) / 2)); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
.site-footer strong { font-size: 20px; }
.site-footer p { max-width: 340px; color: rgba(255,255,255,.58); font-size: 12px; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 12px; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.48); font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 390px; padding: 14px 18px; border-radius: 6px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; }

.modal { width: min(620px, calc(100vw - 30px)); border: 0; border-radius: 8px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(15,22,19,.62); }
.modal__content { padding: 28px; display: grid; gap: 16px; }
.modal__header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.modal__header h3 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.icon-button { border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--muted); }
.modal label, .stack-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
.modal__article { margin: 0; padding: 12px 14px; background: #f1ede5; color: var(--muted); font-size: 13px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; }

.info-main { max-width: 980px; min-height: 70vh; margin: 0 auto; padding: 70px 30px 90px; }
.info-card { padding: 44px; border: 1px solid var(--line); background: var(--surface); }
.info-card h1 { margin: 0 0 24px; font-size: clamp(38px, 6vw, 62px); line-height: 1; letter-spacing: -.055em; }
.info-card h2 { margin: 38px 0 12px; font-size: 24px; letter-spacing: -.025em; }
.info-card p, .info-card li { color: #4f5a55; line-height: 1.72; }
.info-card ul { padding-left: 22px; }
.info-card .lead { font-size: 19px; color: var(--ink); }
.info-nav { margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 15px; }
.info-nav a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.stack-form { max-width: 680px; display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notice { padding: 14px 16px; border-left: 3px solid var(--accent); background: #f3ece7; color: #5d645f; font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { padding: 18px; border: 1px solid var(--line); background: #faf8f2; }
.metric strong { display: block; font-size: 28px; }
.metric span { color: var(--muted); font-size: 11px; }
.admin-section { margin-top: 26px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
pre.admin-json { max-height: 400px; overflow: auto; padding: 16px; background: #18211d; color: #dce6e0; font-size: 11px; }

@media (max-width: 1080px) {
  .masthead__meta { display: none; }
  .toolbar { grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(140px, 1fr)); }
  .article-card { grid-template-columns: 285px minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .site-footer__grid nav:last-child { grid-column: 2 / 4; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .masthead__inner, main { padding-left: 18px; padding-right: 18px; }
  .top-nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 44px 0 34px; gap: 28px; }
  .hero h2 { font-size: 44px; }
  .hero__stat { width: 180px; }
  .toolbar { position: static; margin: 0; padding: 14px 0; grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
  .article-card { grid-template-columns: 1fr; }
  .article-card__image-link { min-height: 230px; max-height: 310px; }
  .article-card__body { padding: 21px; }
  .article-card__footer { align-items: start; flex-direction: column; }
  .card-actions { width: 100%; justify-content: flex-start; }
  .newsletter-strip { grid-template-columns: 1fr; padding: 24px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > div { grid-column: 1 / -1; }
  .site-footer__grid nav:last-child { grid-column: auto; flex-direction: column; }
  .info-main { padding: 36px 18px 60px; }
  .info-card { padding: 26px 20px; }
  .form-grid, .metric-grid { grid-template-columns: 1fr; }
}
@media (max-width: 470px) {
  .toolbar { grid-template-columns: 1fr; }
  .search-box { grid-column: auto; }
  .feed-header { align-items: start; flex-direction: column; }
  .article-card__topline { flex-direction: column-reverse; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form .consent-row, .inline-form .form-status { grid-column: auto; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 39px; }
}

/* v1.3.2 image overlay correction
   Author CSS display rules can override the native hidden attribute.
   Force the inactive layer to disappear and keep loaded images above fallback art. */
.article-card__image[hidden],
.article-card__placeholder[hidden] {
  display: none !important;
}

.article-card__image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__placeholder {
  z-index: 1;
}
