/* Mishal Brands — site styles. No frameworks; one self-hosted display face. */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f0e8;
  --sheet: #fbfaf6;
  --ink: #1c1916;
  --ink-soft: #3a352f;
  --muted: #5b554b;
  --line: #ddd5c6;
  --line-soft: #e8e2d6;
  --green: #1d4a38;
  --green-dark: #133426;
  --green-tint: #e4ebe4;
  --notice: #fbf1cf;
  --notice-line: #b58d3e;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 42rem;
  --wide: 62rem;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(28, 25, 22, 0.04), 0 8px 24px -16px rgba(28, 25, 22, 0.25);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--green-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--green);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-weight: 650;
  text-decoration: none;
}
.skip:focus { top: 1rem; color: #fff; }

.wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin: 0 auto;
}

.narrow { width: min(var(--max), 100%); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.wordmark svg { width: 34px; height: 34px; flex: none; }

.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
  font-size: 0.97rem;
}
.primary a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.primary a:hover { color: var(--green); border-bottom-color: var(--line); }
.primary a[aria-current="page"], .primary a.in-section {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}

/* Breadcrumbs */
.crumbs { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line); color: #a39a8a; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink-soft); }

/* Type */
h1, h2, .display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  margin: 1.1rem 0 0.8rem;
}
h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  margin: 2.6rem 0 0.8rem;
}
h3 {
  font-size: 1.07rem;
  line-height: 1.35;
  margin: 1.6rem 0 0.4rem;
  letter-spacing: -0.005em;
}
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin: 0.3rem 0; }
code { font-size: 0.9em; background: var(--line-soft); padding: 0.05em 0.35em; border-radius: 4px; }

.lede {
  font-size: clamp(1.12rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.note { color: var(--muted); font-size: 0.95rem; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.6rem;
}

.checked {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.checked::before {
  content: "";
  display: inline-block;
  vertical-align: 0.08em;
  margin-right: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}

/* Boxes */
.quick {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1.05rem;
  margin: 0 0 1.4rem;
  box-shadow: var(--shadow);
}
.quick .label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.35rem;
}
.quick p:last-child { margin-bottom: 0; }

.disclosure, .neutral-note {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.6rem;
  font-size: 0.95rem;
}
.disclosure { background: var(--notice); border: 1px solid var(--notice-line); }
.neutral-note { background: var(--green-tint); border: 1px solid #c3d1c6; }
.disclosure p, .neutral-note p { margin: 0; }

section { padding-bottom: 0.25rem; }

/* Tables */
.table-wrap { margin: 0.6rem 0 1.2rem; }
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sheet);
  font-size: 0.97rem;
  margin: 0.6rem 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}
tbody tr:last-child td { border-bottom: 0; }
th {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  background: #f6f3ec;
  border-bottom: 1px solid var(--line);
}
td:first-child { font-weight: 600; }
.compare td:first-child { width: 22%; }

/* CTA */
.actions {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.35rem 1.35rem;
  margin: 1.6rem 0 2rem;
  box-shadow: var(--shadow);
}
.actions .label { margin: 0 0 1rem; font-size: 0.95rem; color: var(--ink-soft); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--green);
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.button:focus-visible { outline-color: var(--ink); }
.button.ghost { background: transparent; color: var(--green); }
.button.ghost:hover { background: var(--green-tint); color: var(--green-dark); }
.link-list { margin: 0; padding-left: 1.15rem; }
.link-list li { margin: 0.4rem 0; }

/* Sources */
.sources {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.sources p { margin: 0 0 0.6rem; }

/* Cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.25rem 1.15rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--green); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-2px); }
}
.card .tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.5rem;
}
.card h2, .card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.45rem;
  letter-spacing: -0.01em;
}
.card h3 { font-size: 1.18rem; }
.card a.stretched { color: var(--ink); text-decoration: none; }
.card a.stretched::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.card a.stretched:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0 0 0.8rem; }
.card .meta { margin-top: auto; font-size: 0.84rem; color: var(--muted); }

.related { margin-top: 2.8rem; }
.related h2 { margin-top: 0; }

/* Home */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 15ch;
  margin: 0 0 1.1rem;
}
.hero .lede { max-width: 36rem; font-size: clamp(1.12rem, 1.8vw, 1.3rem); }
.hero .button-row { margin-top: 1.6rem; }

.band { padding: 1.5rem 0 1rem; }
.band > h2 { margin-top: 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.latest { list-style: none; margin: 0.6rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.latest li { margin: 0; border-bottom: 1px solid var(--line); }
.latest a {
  display: grid;
  grid-template-columns: 9.5rem 1fr auto;
  gap: 0.25rem 1.25rem;
  align-items: baseline;
  padding: 1rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
}
.latest a:hover .t { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; }
.latest .c { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.latest .t { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; line-height: 1.25; }
.latest .d { display: block; font-family: var(--sans); font-size: 0.94rem; font-weight: 400; color: var(--ink-soft); margin-top: 0.15rem; }
.latest .m { font-size: 0.84rem; color: var(--muted); white-space: nowrap; }

.trust {
  margin: 2.6rem 0 1rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.trust > div { background: var(--sheet); padding: 1.25rem 1.3rem; }
.trust h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.trust p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

.hub-eyebrow { margin-top: 2rem; }
.coming { color: var(--muted); font-size: 0.96rem; margin-top: 1.25rem; }

.hero-home { display: grid; gap: 2rem 3.5rem; align-items: center; }
@media (min-width: 900px) { .hero-home { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
.hero-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem 1.6rem 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute;
  left: 1.6rem; top: 0;
  width: 3rem; height: 4px;
  background: var(--green);
  border-radius: 0 0 4px 4px;
}
.hero-card .label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin: 0.2rem 0 0.9rem; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2rem;
  border-top: 1px solid var(--line-soft);
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.35;
}
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.95rem;
  width: 0.95rem; height: 0.95rem;
  border-radius: 50%;
  background: var(--green-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%231d4a38' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: #eeeae0;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.foot-grid {
  display: grid;
  gap: 1.75rem 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
  padding: 2.4rem 0 1.6rem;
}
.foot-grid .wordmark { font-size: 1.25rem; }
.foot-grid .wordmark svg { width: 28px; height: 28px; }
.foot-tag { margin: 0.75rem 0 0; color: var(--muted); max-width: 22rem; }
.foot-h { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }
.foot-base {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot-base p { margin: 0; }
.foot-base a { color: var(--muted); }

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 1.03rem; }
  .wrap { width: calc(100% - 2rem); }
  .site-header .bar { padding: 0.85rem 0 0.4rem; gap: 0.5rem; }
  .wordmark { font-size: 1.3rem; }
  .wordmark svg { width: 30px; height: 30px; }
  .primary {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    overflow-x: auto;
    gap: 0.75rem;
    font-size: 0.875rem;
    letter-spacing: -0.005em;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .primary::-webkit-scrollbar { display: none; }
  .primary a { white-space: nowrap; padding: 0.55rem 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .latest a { grid-template-columns: 1fr; gap: 0.2rem; }
  .crumbs li[aria-current="page"] { display: none; }
  .crumbs li:nth-last-child(2)::after { content: ""; }
  .latest .m { white-space: normal; }

  table, thead, tbody, th, td, tr { display: block; }
  table { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.2rem;
  }
  td { border-bottom: 0; padding: 0.35rem 0.85rem; }
  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 650;
  }
  td:first-child { font-family: var(--serif); font-size: 1.12rem; padding-top: 0.6rem; }
  td:first-child::before { content: none; }
  .compare td:first-child { width: auto; }
}

@media print {
  .site-header nav, .site-footer, .actions .button-row { display: none; }
  body { background: #fff; }
}
