/* ==========================================================================
   Hawaii Digital Currency — Pacific Broadsheet & Woodblock Editorial Theme
   Old-timey Hawaiʻi newspaper layout × Japanese ukiyo-e woodblock palette
   ========================================================================== */

:root {
  /* Washi & Aged Newsprint Palette */
  --bg: #F7F2E7;
  --bg-alt: #EFE8D8;
  --surface: #FCF9F2;
  --ink: #161817;
  --ink-soft: #3B403D;
  --muted: #636965;
  --rule: #C9BFA9;
  --rule-strong: #161817;

  /* Ukiyo-e Ink Accents */
  --teal: #0E5A5A;        /* Prussian / Pacific indigo-teal */
  --teal-soft: rgba(14, 90, 90, 0.09);
  --ochre: #B8441F;       /* Hanko vermilion / volcanic terracotta */
  --ochre-soft: rgba(184, 68, 31, 0.10);
  --gold: #9A7B2C;        /* Aged brass / woodblock gold */
  --ok: #1D653B;

  /* Typography */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1220px;
  --shadow: 0 10px 28px rgba(22, 24, 23, 0.08);
}

[data-theme="dark"] {
  --bg: #0E1316;
  --bg-alt: #141B20;
  --surface: #182026;
  --ink: #EDE8DC;
  --ink-soft: #C5C8C4;
  --muted: #8E979B;
  --rule: #2A343C;
  --rule-strong: #EDE8DC;

  --teal: #38B6AE;
  --teal-soft: rgba(56, 182, 174, 0.13);
  --ochre: #E67E50;
  --ochre-soft: rgba(230, 126, 80, 0.14);
  --gold: #D4AE57;
  --ok: #4CC37A;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--ochre);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.max-container {
  max-width: 900px;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--ochre));
  z-index: 1200;
  transition: width 0.08s linear;
}

/* Top Gazette / Statutory Strip */
.statute-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
  font-size: 0.76rem;
  padding: 8px 0;
}

.statute-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.statute-dateline {
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.statute-items {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.statute-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.71rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.statute-pill:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: var(--teal);
}

.dot.warn { background: var(--ochre); }
.dot.ok { background: var(--ok); }

/* Broadsheet Masthead */
.masthead {
  padding: 20px 0 0;
}

.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.masthead-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 20px;
  border-bottom: 3px double var(--rule-strong);
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.brand-seal {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  border: 1px solid var(--ochre);
  padding: 2px 9px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.brand-wordmark {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
  margin: 0;
}

.brand-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 9px;
  font-weight: 600;
}

/* Sticky Navigation Strip */
.nav-strip {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 0.82rem;
  width: 190px;
  transition: border-color 0.15s, width 0.2s;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--teal);
  width: 230px;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 300px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  display: none;
  z-index: 1000;
}

.search-results li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.search-results li:last-child a {
  border-bottom: 0;
}

.search-results li a:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.theme-btn {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.theme-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 9px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}

/* Section Kickers & Stamp Badges */
.section-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--teal);
  font-weight: 600;
  margin: 0 0 6px;
  display: block;
}

.stamp-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px solid var(--ochre);
  color: var(--ochre);
  background: var(--ochre-soft);
  border-radius: 2px;
  text-decoration: none;
}

.stamp-badge.teal {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

/* Woodblock Image Plate Frame */
.woodblock-frame {
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 4px 14px rgba(22, 24, 23, 0.08);
}

.woodblock-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Broadsheet 2-Column Front Page */
.frontpage {
  padding: 30px 0 48px;
}

.broadsheet-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.editorial-main {
  min-width: 0;
}

.editorial-rail {
  display: grid;
  gap: 22px;
  min-width: 0;
  border-left: 1px solid var(--rule);
  padding-left: 28px;
}

/* Lead Feature Story */
.lead-story {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 3px double var(--rule-strong);
}

.lead-story-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 26px;
  align-items: center;
}

.lead-story h2 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 10px 0 12px;
}

.lead-story h2 a {
  color: var(--ink);
  text-decoration: none;
}

.lead-story h2 a:hover {
  color: var(--teal);
}

.lead-deck {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 14px;
}

.byline-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Dispatch Grid (Article Cards) */
.section-head-rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--rule-strong);
}

.section-head-rule h2,
.section-head-rule h1 {
  font-family: var(--serif);
  font-size: 1.55rem;
  margin: 0;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.dispatch-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
}

.dispatch-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.dispatch-card .card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
}

.dispatch-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dispatch-card h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.24;
  margin: 0;
}

.dispatch-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.dispatch-card h3 a:hover {
  color: var(--teal);
}

.dispatch-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Editorial Rail Boxes */
.rail-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 18px;
}

.rail-box.shaded {
  background: var(--bg-alt);
}

.rail-box h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.rail-box p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.rail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.rail-list li {
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.86rem;
}

.rail-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Explainer Strip on Homepage */
.explainer-band {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 3px double var(--rule-strong);
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.explainer-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.explainer-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
}

.explainer-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Single Page & Article Layout */
.page-wrap,
.post-wrap {
  padding: 32px 0 56px;
}

.page-header,
.post-header {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 3px double var(--rule-strong);
}

.page-header h1,
.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}

.page-deck,
.post-deck {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 68ch;
}

.post-article {
  max-width: 780px;
  margin: 0 auto;
}

.post-cover-plate {
  margin: 0 0 26px;
}

.post-content {
  font-size: 1.04rem;
  line-height: 1.74;
  color: var(--ink);
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.22;
  margin: 32px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.post-content h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  margin: 24px 0 8px;
}

.post-content p {
  margin: 0 0 16px;
}

.post-content > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.3rem;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--teal);
}

.post-content ul,
.post-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--ochre);
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
  background: var(--surface);
}

.post-content th,
.post-content td {
  border: 1px solid var(--rule);
  padding: 9px 12px;
  text-align: left;
}

.post-content th {
  background: var(--bg-alt);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-content img {
  margin: 20px auto;
  border: 1px solid var(--rule-strong);
  padding: 4px;
  background: var(--surface);
}

.blog-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 2px solid var(--rule-strong);
  font-family: var(--serif);
  font-size: 1.02rem;
}

/* Broadsheet Buttons */
.btn-broadsheet {
  display: inline-block;
  padding: 9px 16px;
  background: var(--teal);
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid var(--teal);
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-broadsheet:hover {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #FFFFFF;
}

/* Forms (Contact Page) */
.page-wrap form {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 22px;
  max-width: 640px;
}

.page-wrap label {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 0 6px;
  color: var(--ink-soft);
}

.page-wrap input[type="text"],
.page-wrap input[type="email"],
.page-wrap textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  background: var(--bg);
  border-radius: 2px;
}

.page-wrap input[type="submit"],
.page-wrap button[type="submit"] {
  margin-top: 16px;
  padding: 10px 18px;
  background: var(--teal);
  color: #fff;
  border: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* Contact 2-Column Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

.contact-grid form {
  max-width: 100%;
}

/* FAQ Definition List Styling */
dl.faq {
  margin: 18px 0 0;
  display: grid;
  gap: 16px;
}

dl.faq .faq-item,
dl.faq > div {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  padding: 16px 18px;
}

dl.faq dt {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

dl.faq dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Staff / Contributors Grid */
ul.staff {
  list-style: none;
  padding: 28px 0 0;
  margin: 28px 0 0;
  border-top: 2px solid var(--rule-strong);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 24px;
}

ul.staff .staff-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 16px;
  text-align: center;
}

ul.staff .square-image {
  margin: 0 auto 12px;
  max-width: 220px;
}

ul.staff .square-image img {
  margin: 0;
  border: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

ul.staff .name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

ul.staff .name a {
  color: var(--ink);
  text-decoration: none;
}

ul.staff .name a:hover {
  color: var(--teal);
}

ul.staff .position {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 4px;
}

/* Footer */
.broadsheet-footer {
  margin-top: 40px;
  padding: 28px 0 36px;
  border-top: 3px double var(--rule-strong);
  background: var(--bg-alt);
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-colophon h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.footer-disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 960px) {
  .broadsheet-2col,
  .lead-story-grid,
  .explainer-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .editorial-rail {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }
}

@media (max-width: 720px) {
  .dispatch-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0 12px;
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-inner {
    flex-wrap: wrap;
    padding: 6px 0;
  }

  .search-wrap input {
    width: 140px;
  }

  .search-wrap input:focus {
    width: 170px;
  }
}
