@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400&family=Zen+Kaku+Gothic+Antique:wght@400;500;700&display=swap');

/* quartznook.com — spec-sheet / criteria-card architecture
   Warm stone/greige base + precise muted teal. Compact, table-led, "精密".
   Fonts: Zen Kaku Gothic Antique (headings + body) + DM Mono (spec codes). */

:root {
  --bg: #e7e2d8;          /* warm stone / greige */
  --paper: #f3efe7;       /* card surface, a touch lighter than bg */
  --paper-2: #ece7dd;     /* alternate fill for table stripes */
  --ink: #2c2a26;         /* near-black warm ink */
  --ink-2: #524d44;       /* secondary ink */
  --muted: #807868;       /* greige muted text */
  --line: #cfc7b6;        /* hairline border, warm */
  --line-strong: #b4ab97; /* heavier rule */
  --teal: #5c8f86;        /* precise muted teal accent */
  --teal-deep: #426b64;
  --teal-wash: #dfe7e2;   /* faint teal fill for chips */
  --radius: 4px;          /* tight, precise corners */
  --maxw: 1240px;

  --font-zen: "Zen Kaku Gothic Antique", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-zen);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--teal-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0;
}

.dim {
  color: var(--muted);
}

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

/* ============================================================
   PERSISTENT CHROME — nameplate (part-number plate) + criteria strip
   Not a top brand-bar with horizontal nav.
   ============================================================ */

.nameplate {
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}

.nameplate-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.plate-mark {
  display: inline-flex;
  align-items: stretch;
  gap: 12px;
  color: var(--ink);
}
.plate-mark:hover {
  text-decoration: none;
}

.plate-code {
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 10px 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
}

.plate-words {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.plate-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.plate-latin {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.plate-tagline {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  padding-bottom: 2px;
}

.criteria-strip {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 9px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.strip-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  white-space: nowrap;
  flex: none;
}

.strip-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.strip-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--bg);
}

.chip-idx {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--teal);
}

/* ============================================================
   HOME — cover plate (spec-sheet cover) + tight grid of spec cards
   ============================================================ */

.nook {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 32px 56px;
}

.cover {
  margin-bottom: 34px;
}

.cover-plate {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 38px 40px 32px;
  color: var(--ink);
  /* lead image layered over a brand gradient fallback; complete without the jpg */
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(243, 239, 231, 0.93), rgba(231, 226, 216, 0.9)),
    linear-gradient(125deg, rgba(92, 143, 134, 0.18), rgba(180, 171, 151, 0.1)),
    url("/images/quartznook-lead.jpg");
  background-size: cover, cover, cover;
  background-position: center, center, center;
}

.cover-plate::before {
  /* precise corner tick, spec-sheet detail */
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-top: 1.5px solid var(--teal);
  border-right: 1.5px solid var(--teal);
}

.cover-kicker {
  margin: 0 0 16px;
  display: flex;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cover-title {
  margin: 0 0 14px;
  font-size: 33px;
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: 0.005em;
  max-width: 22ch;
}

.cover-lead {
  margin: 0 0 26px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 56ch;
}

.legend {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(243, 239, 231, 0.7);
}

.legend-row {
  padding: 13px 15px;
  border-right: 1px solid var(--line);
}
.legend-row:last-child {
  border-right: none;
}

.legend-row dt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 3px;
}

.legend-code {
  font-size: 10px;
  color: var(--paper);
  background: var(--teal);
  padding: 2px 5px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.legend-row dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.cover-count {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
}

/* spec-sheet card grid */
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.spec-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

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

.spec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.spec-code {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--teal-deep);
}

.spec-kind {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 2px;
}

.spec-title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.005em;
}
.spec-title a {
  color: var(--ink);
}
.spec-title a:hover {
  color: var(--teal-deep);
  text-decoration: none;
}

.spec-criteria {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spec-chip {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
  background: var(--teal-wash);
  border: 1px solid #bcd0c9;
  padding: 2px 9px;
  border-radius: 2px;
}

.spec-verdict {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spec-line {
  margin: auto 0 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.spec-sep {
  color: var(--line-strong);
}

.spec-open {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  align-self: flex-start;
}

/* ============================================================
   ARTICLE — spec-sheet doc: fixed 定義 table at top, then content
   ============================================================ */

.sheet {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 32px 56px;
}

.sheet-doc {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 34px 40px 40px;
}

.sheet-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 22px;
}

.sheet-tag {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sheet-tag a {
  color: var(--teal-deep);
}

.sheet-h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.sheet-meta {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* the fixed definition / criteria table */
.spec-sheet {
  margin: 0 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
}

.spec-sheet-cap {
  margin: 0;
  padding: 8px 14px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
}

.def-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.def-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--paper-2);
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-strong);
}

.def-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.def-table tbody tr:last-child td {
  border-bottom: none;
}

.def-item {
  width: 22%;
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  background: var(--paper-2);
}

.def-basis {
  width: 30%;
  font-weight: 700;
}

.def-memo {
  color: var(--muted);
  font-size: 12.5px;
}

.sheet-chips {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sheet-chip {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
  background: var(--teal-wash);
  border: 1px solid #bcd0c9;
  padding: 3px 11px;
  border-radius: 2px;
}

.sheet-annot {
  margin: 0 0 24px;
  padding: 14px 16px 14px 18px;
  background: var(--paper-2);
  border-left: 3px solid var(--teal);
  border-radius: 0 3px 3px 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.annot-key {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-right: 10px;
  vertical-align: 1px;
}

/* injected content */
.sheet-content {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
}

.sheet-content > *:first-child {
  margin-top: 0;
}

.sheet-content h2 {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
  margin: 32px 0 12px;
  padding-left: 13px;
  border-left: 4px solid var(--ink);
}

.sheet-content h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 24px 0 8px;
}

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

.sheet-content ul,
.sheet-content ol {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}

.sheet-content ul li,
.sheet-content ol li {
  position: relative;
  padding: 4px 0 4px 22px;
  border-bottom: 1px dotted var(--line);
}
.sheet-content ul li:last-child,
.sheet-content ol li:last-child {
  border-bottom: none;
}

.sheet-content ul li::before {
  content: "▪";
  position: absolute;
  left: 4px;
  top: 4px;
  color: var(--teal);
  font-size: 12px;
}

.sheet-content ol {
  counter-reset: spec-ol;
}
.sheet-content ol li {
  counter-increment: spec-ol;
}
.sheet-content ol li::before {
  content: counter(spec-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal-deep);
}

.sheet-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 13.5px;
  border: 1.5px solid var(--ink);
}

.sheet-content thead th {
  text-align: left;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 12px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.sheet-content tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.sheet-content tbody td:first-child {
  font-weight: 700;
  background: var(--paper-2);
}
.sheet-content tbody td:last-child {
  border-right: none;
}
.sheet-content tbody tr:nth-child(even) td:not(:first-child) {
  background: rgba(236, 231, 221, 0.5);
}

.sheet-content blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  background: var(--teal-wash);
  border: 1px solid #bcd0c9;
  border-left: 4px solid var(--teal);
  border-radius: 0 3px 3px 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--teal-deep);
}
.sheet-content blockquote p {
  margin: 0;
}

.sheet-content a {
  color: var(--teal-deep);
  border-bottom: 1px solid var(--teal);
}
.sheet-content a:hover {
  text-decoration: none;
  background: var(--teal-wash);
}

/* FAQ + sources */
.block-cap {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}

.sheet-faq {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.sheet-faq details {
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 14px;
  margin-bottom: 8px;
  background: var(--bg);
}

.sheet-faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  position: relative;
  padding-right: 26px;
}
.sheet-faq summary::-webkit-details-marker {
  display: none;
}
.sheet-faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 11px;
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 16px;
}
.sheet-faq details[open] summary::after {
  content: "−";
}

.sheet-faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.sheet-faq details p {
  margin: 0;
  padding: 12px 0 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.sheet-sources {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.sheet-sources p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.sheet-back {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1.5px solid var(--ink);
}
.back-link {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--teal-deep);
}

/* ============================================================
   FOOTER
   ============================================================ */

.sheet-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px 40px;
}

.foot-rule {
  height: 1.5px;
  background: var(--ink);
  margin-bottom: 14px;
}

.foot-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.foot-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.foot-note {
  font-size: 12px;
  color: var(--muted);
  max-width: 60ch;
}

/* ============================================================
   RESPONSIVE — graceful collapse on narrow widths
   ============================================================ */

@media (max-width: 1040px) {
  .sheet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nameplate-row,
  .criteria-strip,
  .nook,
  .sheet,
  .sheet-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .nameplate-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cover-plate {
    padding: 26px 20px 24px;
  }
  .cover-title {
    font-size: 25px;
  }
  .legend {
    grid-template-columns: 1fr;
  }
  .legend-row {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .legend-row:last-child {
    border-bottom: none;
  }
  .sheet-grid {
    grid-template-columns: 1fr;
  }
  .sheet-doc {
    padding: 24px 18px 28px;
  }
  .sheet-h1 {
    font-size: 23px;
  }
  .def-table {
    font-size: 12.5px;
  }
  .sheet-content {
    font-size: 14.5px;
  }
  .sheet-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
