@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');
:root { --font-sora: 'Sora'; }

/* Quartz Shelf: crystalline quartz-gray review shelf.
   Palette: quartz gray bg, ink, icy-lilac/blue accent. No coral, no navy, no warm tones.
   Type: Sora (variable) for both headings and body. Signature: faceted dividers + an
   upfront qualitative scoring grid. */

:root {
  --bg: #e9eaee;
  --surface: #ffffff;
  --panel: #f2f3f7;
  --panel-2: #eceef4;
  --ink: #2b2f36;
  --ink-soft: #565d6a;
  --ink-faint: #828a98;
  --line: #d3d7e0;
  --line-strong: #c0c5d2;
  --accent: #8e9bc4;
  --accent-deep: #5d6a9c;
  --accent-tint: #e1e5f1;
  --accent-wash: #eef0f7;

  --lvl-high-bg: #dde2f1;
  --lvl-high-pip: #5d6a9c;
  --lvl-med-bg: #eceef4;
  --lvl-med-pip: #9098a8;
  --lvl-low-bg: #f3f4f6;
  --lvl-low-pip: #c4c8d2;

  --maxw: 1080px;
  --radius: 4px;
  --font: var(--font-sora), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  line-height: 1.18;
  font-weight: 700;
}

a {
  color: var(--accent-deep);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  z-index: 50;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Crystalline header ---------- */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
}
.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid var(--line);
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
}
.quartz-mark {
  display: block;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.wordmark-text strong {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wordmark-text small {
  font-size: 0.74rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
/* thin right rail of comparison-category labels */
.lane-rail {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lane-rail a {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 14px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.lane-rail a:last-child {
  border-right: 0;
}
.lane-rail a:hover {
  background: var(--accent-wash);
  color: var(--accent-deep);
}

/* ---------- Layout shells ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Faceted divider ---------- */
.facet-divider {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  color: var(--accent);
  opacity: 0.55;
}
.facet-divider svg {
  display: block;
}

/* ---------- Lead ---------- */
.lead {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 44px;
}
.eyebrow {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 14px;
}
.lead h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin: 0 0 18px;
}
.lead-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 46ch;
}
.lead-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-facets span {
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.lead-visual {
  position: relative;
  min-height: 280px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  /* JPG layered OVER the crystalline gradient fallback; complete without the image */
  background:
    url("/images/quartzshelf-lead.jpg") center / cover no-repeat,
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0 14px, rgba(255, 255, 255, 0) 14px 30px),
    conic-gradient(from 210deg at 70% 25%, #c9d0e6, #e6e8ef, #aeb8d6, #d6dae8, #c9d0e6),
    linear-gradient(150deg, var(--accent) 0%, #b9c0d8 45%, var(--panel) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.lead-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(43, 47, 54, 0) 55%, rgba(43, 47, 54, 0.16) 100%);
  pointer-events: none;
}

/* ---------- Band headings ---------- */
.band-heading {
  padding: 44px 0 22px;
}
.band-heading h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin: 0 0 8px;
}
.band-heading p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Scoring grid (home signature) ---------- */
.grid-band {
  padding-bottom: 12px;
}
.grid-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.scoring-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.scoring-grid thead th {
  text-align: left;
  vertical-align: bottom;
  padding: 16px 16px;
  background: var(--panel);
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}
.scoring-grid thead th.criterion-col {
  width: 30%;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.opt-label {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
}
.opt-sub {
  display: block;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 2px;
}
.scoring-grid tbody th {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-weight: 600;
  background: var(--panel-2);
}
.criterion-label {
  display: block;
  font-size: 0.96rem;
}
.criterion-note {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 3px;
}
.scoring-grid tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.scoring-grid tbody td:last-child,
.scoring-grid tbody th:last-child {
  border-right: 0;
}
.scoring-grid tbody tr:last-child td,
.scoring-grid tbody tr:last-child th {
  border-bottom: 0;
}
.cell-pip {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  vertical-align: 1px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
td[data-level="high"] {
  background: var(--lvl-high-bg);
}
td[data-level="high"] .cell-pip {
  background: var(--lvl-high-pip);
}
td[data-level="medium"] {
  background: var(--lvl-med-bg);
}
td[data-level="medium"] .cell-pip {
  background: var(--lvl-med-pip);
}
td[data-level="low"] {
  background: var(--lvl-low-bg);
  color: var(--ink-soft);
}
td[data-level="low"] .cell-pip {
  background: var(--lvl-low-pip);
}

/* ---------- Tradeoff cards ---------- */
.tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tradeoff-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}
.tradeoff-facet {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
  font-weight: 600;
}
.tradeoff-card h3 {
  font-size: 1.12rem;
  margin: 8px 0 18px;
}
.tradeoff-cols {
  display: grid;
  gap: 16px;
}
.col-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}
.tradeoff-col.strengths .col-tag {
  color: var(--accent-deep);
}
.tradeoff-col.cautions .col-tag {
  color: var(--ink-faint);
}
.tradeoff-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tradeoff-col li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.tradeoff-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.tradeoff-col.strengths li::before {
  background: var(--accent);
}
.tradeoff-col.cautions li::before {
  background: var(--line-strong);
}

/* ---------- Recent comparisons ---------- */
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.recent-list li + li {
  border-top: 1px solid var(--line);
}
.recent-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.recent-row:hover {
  background: var(--accent-wash);
}
.recent-chip {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-deep);
  font-weight: 600;
  border: 1px solid var(--line);
  padding: 5px 8px;
  text-align: center;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.recent-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recent-main strong {
  font-size: 1.04rem;
  font-weight: 600;
}
.recent-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.recent-date {
  font-size: 0.82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- About band ---------- */
.about-band {
  padding-bottom: 8px;
}
.about-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 34px 32px;
  margin-top: 22px;
}
.about-copy h2 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}
.about-copy p {
  margin: 0;
  color: var(--ink-soft);
}
.method-list {
  margin: 0;
  padding: 0;
  list-style: none;
  align-self: center;
}
.method-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 0.96rem;
}
.method-list li:last-child {
  margin-bottom: 0;
}
.method-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 12px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 32px 24px 56px;
  border-top: 1px solid var(--line-strong);
}
.footer-mark {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.footer-desc {
  color: var(--ink-soft);
  margin: 8px 0 6px;
  max-width: 60ch;
}
.footer-disclosure {
  color: var(--ink-faint);
  font-size: 0.84rem;
  margin: 0;
}

/* ---------- Article ---------- */
.article-shell {
  padding-top: 28px;
  max-width: 760px;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.84rem;
  color: var(--ink-faint);
  margin: 0 0 20px;
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent-deep);
}
.article-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 26px;
}
.article-chip {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.article-head h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  margin: 0 0 16px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--ink-faint);
}
.criteria-rail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}
.criteria-rail li {
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--accent-wash);
  border: 1px solid var(--line);
  padding: 5px 11px;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.brief-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 30px;
}
.brief-kicker {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 6px;
}
.brief-box p {
  margin: 0;
  color: var(--ink);
}

/* injected body content */
.article-content {
  font-size: 1.05rem;
}
.article-content > * {
  margin: 0 0 1.1em;
}
.article-content h2 {
  font-size: 1.45rem;
  margin: 1.9em 0 0.6em;
  padding-top: 0.4em;
  border-top: 1px solid var(--line);
}
.article-content h3 {
  font-size: 1.18rem;
  margin: 1.5em 0 0.5em;
}
.article-content a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.article-content a:hover {
  text-decoration-thickness: 2px;
}
.article-content ul,
.article-content ol {
  padding-left: 1.3em;
}
.article-content li {
  margin-bottom: 0.5em;
}
.article-content blockquote {
  margin: 1.4em 0;
  padding: 16px 22px;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 1.06rem;
}
.article-content blockquote p {
  margin: 0;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.6em 0;
  border: 1px solid var(--line-strong);
  display: block;
  overflow-x: auto;
}
.article-content thead th {
  background: var(--panel);
  text-align: left;
  padding: 11px 14px;
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.article-content tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
}
.article-content tbody td:last-child {
  border-right: 0;
}
.article-content tbody tr:nth-child(even) {
  background: var(--panel-2);
}

/* FAQ */
.faq-section {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.faq-section h2 {
  font-size: 1.4rem;
  margin: 0 0 16px;
}
.faq-section details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px 18px;
  margin-bottom: 10px;
}
.faq-section summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-section summary::-webkit-details-marker {
  display: none;
}
.faq-section summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 11px;
  color: var(--accent-deep);
  font-size: 1.2rem;
  line-height: 1;
}
.faq-section details[open] summary::after {
  content: "–";
}
.faq-section details p {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

/* sources */
.source-note {
  margin-top: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.source-note h2 {
  font-size: 1.18rem;
  margin: 0 0 10px;
}
.source-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.article-foot {
  margin-top: 32px;
}
.back-link {
  display: inline-block;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}
.back-link:hover {
  background: var(--accent-wash);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .lead {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .lead-visual {
    min-height: 200px;
    order: -1;
  }
  .tradeoff-grid {
    grid-template-columns: 1fr;
  }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .lane-rail {
    flex-wrap: wrap;
  }
  .recent-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .recent-chip {
    justify-self: start;
  }
}
