/* ===========================================================================
   ShadowPhones
   Direction: field inspection record.

   Every phone here is one specific used handset that somebody photographed,
   graded and measured. So the storefront is built like the paperwork that
   comes with a serviced instrument: bright, cool, documentary, nothing hidden.
   A privacy company reads as more trustworthy showing everything in daylight
   than hiding behind another dark terminal skin.

   The name is paid off in the lighting, not the palette -- plates and devices
   sit under one directional lamp and cast a single tight shadow, the way an
   object does on a workbench.

   Signature element: the nameplate. An inverted ink block carrying the Pixel's
   GrapheneOS codename and its measured facts, the way an asset tag is fixed to
   serviced equipment.
   =========================================================================== */

/* --- self-hosted faces: this site makes no third-party requests ----------- */
@font-face {
  font-family: "Plex Cond"; src: url("/static/fonts/ibm-plex-sans-condensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Cond"; src: url("/static/fonts/ibm-plex-sans-condensed-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono"; src: url("/static/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono"; src: url("/static/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  /* cool laboratory neutrals -- grey, never cream */
  --paper:      #e8ebee;
  --paper-deep: #dde1e6;
  --plate:      #ffffff;
  --ink:        #0f1319;
  --ink-2:      #4d5765;
  --ink-3:      #7d8794;
  --rule:       #c6cdd5;
  --rule-soft:  #dfe4e9;

  /* one signal colour, borrowed from instrument panels */
  --signal:     #cf3f0c;
  --signal-ink: #a03108;
  --signal-wash:#fdece4;

  /* reserved strictly for verification marks */
  --verify:     #0d6b4d;
  --verify-wash:#e3f2ec;

  --display: "Plex Cond", "IBM Plex Sans Condensed", "Helvetica Neue", Arial, sans-serif;
  --body:    "Plex", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "Plex Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* the workbench lamp: one light, up and to the left */
  --lamp:      14px 18px 34px -16px rgba(15, 19, 25, .40);
  --lamp-low:   6px  8px 18px -10px rgba(15, 19, 25, .32);
  --lamp-high: 20px 26px 46px -18px rgba(15, 19, 25, .44);

  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--signal-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }

/* --- shared type roles ---------------------------------------------------- */
.label {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.label-signal { color: var(--signal); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; line-height: 1.06; }

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; }

/* --- masthead ------------------------------------------------------------- */
.topbar { background: var(--ink); color: var(--paper); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 9px; color: var(--paper); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.24rem; letter-spacing: .01em; }
.brand-tick { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--signal); }
.nav { display: flex; gap: 26px; font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.nav a { color: #a9b3c0; }
.nav a:hover { color: #fff; text-decoration: none; }

/* --- hero ----------------------------------------------------------------- */
.hero { padding: 74px 0 78px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.6rem); margin: 16px 0 0; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; margin: 22px 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* the bench: real handsets under the lamp */
.bench { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.bench-unit { background: var(--plate); box-shadow: var(--lamp); overflow: hidden; }
.bench-unit:first-child { grid-column: 1 / -1; }
.bench-unit:hover { text-decoration: none; }
.bench-shot { aspect-ratio: 16 / 10; background: var(--paper-deep); overflow: hidden; }
.bench-unit:first-child .bench-shot { aspect-ratio: 2 / 1; }
.bench-shot img { width: 100%; height: 100%; object-fit: cover; }

/* --- SIGNATURE: the nameplate --------------------------------------------- */
.nameplate {
  background: var(--ink); color: #eef1f4;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
}
.nameplate-code { color: #fff; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.nameplate-code::before { content: "◦ "; color: var(--signal); }
.nameplate-facts { color: #97a1af; white-space: nowrap; }
.nameplate-price { color: var(--plate); font-weight: 500; }

.nameplate-lg { padding: 14px 18px; font-size: .82rem; }
.nameplate-lg .nameplate-code { font-size: 1rem; }

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; padding: 15px 26px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-signal { background: var(--signal); border-color: var(--signal); color: #fff; box-shadow: var(--lamp-low); }
.btn-signal:hover { background: var(--signal-ink); border-color: var(--signal-ink); color: #fff; box-shadow: var(--lamp); }
.btn-ghost { border-color: var(--rule); color: var(--ink-2); }
.btn-ghost:hover { background: var(--rule-soft); color: var(--ink); }
.btn-danger { border-color: var(--signal); color: var(--signal); }
.btn-danger:hover { background: var(--signal); color: #fff; }
.btn[disabled], .btn.disabled { opacity: .34; pointer-events: none; }
.btn-block { width: 100%; text-align: center; }

/* --- section rhythm ------------------------------------------------------- */
.band { padding: 72px 0; border-top: 1px solid var(--rule); }
.band-ink { background: var(--ink); color: var(--paper); border-top: 0; }
.band-ink h2 { color: #fff; }
.band-ink .muted { color: #9aa4b1; }

.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.band-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: 8px 0 0; }

/* --- process: a genuine sequence, so it is labelled as stages ------------- */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
.stage { border-top: 2px solid var(--ink); padding-top: 16px; }
.stage-tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--signal); }
.stage h3 { font-size: 1.16rem; margin: 10px 0 8px; }
.stage p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.band-ink .stage { border-top-color: var(--signal); }
.band-ink .stage p { color: #9aa4b1; }

/* --- unit grid ------------------------------------------------------------ */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }
.unit {
  background: var(--plate); box-shadow: var(--lamp-low); display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.unit:hover { box-shadow: var(--lamp-high); transform: translate(-2px, -3px); text-decoration: none; }
.unit-shot { aspect-ratio: 4 / 3; background: var(--paper-deep); overflow: hidden; }
.unit-shot img { width: 100%; height: 100%; object-fit: cover; }
.unit-body { padding: 18px 18px 0; flex: 1; }
.unit-model { font-family: var(--display); font-weight: 700; font-size: 1.32rem; line-height: 1.12; color: var(--ink); }
.unit-sub { font-size: .88rem; color: var(--ink-2); margin-top: 3px; }
.unit-meter { padding: 16px 18px 18px; }

/* battery: a measurement, drawn as one */
.meter { display: flex; align-items: center; gap: 10px; }
.meter-track { flex: 1; height: 4px; background: var(--rule-soft); position: relative; }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--verify); }
.meter-fill.is-low { background: var(--signal); }
.meter-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--ink-3); white-space: nowrap; }

.grade {
  font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .1em;
  border: 1px solid var(--rule); padding: 2px 7px; color: var(--ink-2);
}
.grade-top { border-color: var(--verify); color: var(--verify); }

/* --- filters -------------------------------------------------------------- */
.filters {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  background: var(--plate); box-shadow: var(--lamp-low); padding: 18px 20px; margin-bottom: 32px;
}
.filters .label { margin-right: -6px; }
select, input[type=text], input[type=search], textarea {
  background: var(--paper); border: 1px solid var(--rule); color: var(--ink);
  font-family: var(--mono); font-size: .82rem; padding: 9px 11px;
}

/* --- product page --------------------------------------------------------- */
.pdp { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; padding: 52px 0 80px; align-items: start; }
.shot-main { background: var(--plate); box-shadow: var(--lamp); aspect-ratio: 4 / 3; overflow: hidden; }
.shot-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 16px; }
.thumbs button { padding: 0; border: 1px solid transparent; background: var(--plate); aspect-ratio: 1; cursor: pointer; overflow: hidden; box-shadow: var(--lamp-low); }
.thumbs button[aria-current="true"] { border-color: var(--signal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); margin: 10px 0 6px; }
.pdp-sub { color: var(--ink-2); }
.pdp-price { font-family: var(--mono); font-weight: 500; font-size: 2.1rem; color: var(--ink); margin: 26px 0 2px; }
.pdp-price-note { font-size: .86rem; color: var(--ink-2); }

/* the inspection record */
.record { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: .92rem; }
.record th, .record td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.record th { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); width: 44%; }
.record td { font-family: var(--mono); font-size: .86rem; }
.record .verified { color: var(--verify); }

.choice { display: grid; gap: 12px; margin: 26px 0; }
.choice-opt { display: flex; gap: 13px; align-items: flex-start; padding: 16px; background: var(--plate); border: 1px solid var(--rule); cursor: pointer; }
.choice-opt:has(input:checked) { border-color: var(--signal); box-shadow: inset 3px 0 0 var(--signal); }
.choice-opt input { margin-top: 5px; accent-color: var(--signal); }
.choice-opt strong { display: block; font-size: .97rem; }
.choice-opt span { color: var(--ink-2); font-size: .87rem; }

.note { background: var(--plate); border-left: 3px solid var(--rule); padding: 15px 18px; font-size: .9rem; color: var(--ink-2); }
.note-signal { border-left-color: var(--signal); }
.note-verify { border-left-color: var(--verify); }

/* --- prose ---------------------------------------------------------------- */
.prose { max-width: 68ch; padding: 60px 0 80px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin: 0 0 12px; }
.prose h2 { font-size: 1.4rem; margin: 46px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--ink); font-weight: 500; }

/* --- states --------------------------------------------------------------- */
.empty { text-align: center; padding: 88px 24px; background: var(--plate); box-shadow: var(--lamp-low); }
.center-page { max-width: 660px; margin: 0 auto; padding: 88px 24px; }

/* --- footer --------------------------------------------------------------- */
.footer { background: var(--ink); color: #9aa4b1; padding: 56px 0 44px; }
.footer a { color: #c5cdd7; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.5fr; gap: 40px; }
.footer h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #6f7b8a; margin: 0 0 14px; font-weight: 500; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: .92rem; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: #fff; }
.colophon { border-top: 1px solid #232a33; margin-top: 40px; padding-top: 22px; font-size: .8rem; color: #6f7b8a; }

/* --- admin console -------------------------------------------------------- */
.admin { padding: 40px 0 80px; }
.admin h1 { font-family: var(--mono); font-weight: 500; font-size: 1.15rem; letter-spacing: .06em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin: 26px 0 40px; }
.tile { background: var(--plate); box-shadow: var(--lamp-low); padding: 18px; }
.tile .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.tile .v { font-family: var(--mono); font-size: 1.5rem; margin-top: 8px; }

table.data { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .82rem; background: var(--plate); box-shadow: var(--lamp-low); }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule-soft); }
table.data th { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
table.data tr:last-child td { border-bottom: 0; }

.pill { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--rule); color: var(--ink-2); }
.pill-paid      { border-color: var(--signal); color: var(--signal); }
.pill-ordered   { border-color: var(--ink-2);  color: var(--ink-2); }
.pill-confirmed { border-color: var(--verify); color: var(--verify); }
.pill-shipped   { border-color: var(--verify); background: var(--verify); color: #fff; }
.pill-refunded  { border-color: var(--ink-3);  color: var(--ink-3); }

.op { background: var(--plate); box-shadow: var(--lamp-low); padding: 24px; margin-bottom: 18px; }
.op-danger { box-shadow: var(--lamp-low), inset 4px 0 0 var(--signal); }
.op h3 { font-size: 1.1rem; margin: 0 0 7px; }
.op p { margin: 0 0 18px; color: var(--ink-2); font-size: .9rem; }
.flash { background: var(--verify-wash); border-left: 3px solid var(--verify); padding: 13px 17px; margin-bottom: 22px; font-family: var(--mono); font-size: .82rem; }
.flash-error { background: var(--signal-wash); border-left-color: var(--signal); color: var(--signal-ink); }

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 940px) {
  .hero-grid, .pdp, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 56px; }
  .hero-grid { gap: 40px; }
  .pdp { gap: 34px; padding-top: 32px; }
  .band { padding: 56px 0; }
}
@media (max-width: 620px) {
  .topbar-inner { height: auto; padding-top: 12px; padding-bottom: 12px;
                  flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav { gap: 16px; flex-wrap: wrap; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .bench { grid-template-columns: 1fr; }
  .nameplate { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .unit:hover { transform: none; }
}

/* --- fault disclosure ------------------------------------------------------
   A known fault is never allowed to hide below the fold or behind a tooltip.
   It gets a flag on the card and a block above the buy button. */
.fault-flag {
  margin: 12px 0 0; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--signal);
}
.disclose {
  background: var(--signal-wash); border-left: 3px solid var(--signal);
  padding: 16px 18px; margin: 26px 0;
}
.disclose-head {
  margin: 0 0 8px; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--signal-ink);
}
.disclose-body { margin: 0 0 8px; font-size: .89rem; color: var(--ink-2); }
.disclose-body:last-child { margin-bottom: 0; }

/* --- cosmetic rating scale -------------------------------------------------
   Grades are the one thing a used-phone buyer reads most carefully, so the
   scale gets its own typographic treatment rather than a bullet list. */
.scale { margin: 24px 0 8px; border-top: 1px solid var(--rule); }
.scale-row {
  display: grid; grid-template-columns: 68px 1fr; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--rule-soft); align-items: baseline;
}
.scale-key {
  font-family: var(--mono); font-weight: 500; font-size: 1.05rem;
  color: var(--signal); letter-spacing: .04em;
}
.scale-val { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) {
  .scale-row { grid-template-columns: 48px 1fr; gap: 14px; }
}

/* --- contact form ----------------------------------------------------------
   The destination address is never printed anywhere; the form is the channel. */
.cform { display: grid; gap: 22px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field label {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.field label .opt { color: var(--ink-3); letter-spacing: .06em; }
.field input, .field textarea {
  width: 100%; background: var(--plate); border: 1px solid var(--rule);
  padding: 12px 14px; font-family: var(--body); font-size: .97rem; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--signal); outline-offset: -1px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--signal); }
.field-hint { margin: 0; font-size: .82rem; color: var(--ink-3); }
.field-err { margin: 0; font-size: .84rem; color: var(--signal-ink); }
/* Off-screen rather than display:none -- some bots skip hidden inputs. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

/* --- hero headline ---------------------------------------------------------
   The acronym carries the claim; the expansion underneath spells it out with
   its initials picked out, so the phrase explains its own abbreviation. */
.hero h1.wysiwyg { display: grid; gap: .28em; }
.wysiwyg-acronym {
  font-size: clamp(3rem, 8.2vw, 6rem); line-height: .92;
  letter-spacing: -.02em; color: var(--ink);
}
.wysiwyg-expand {
  font-family: var(--body); font-weight: 400;
  font-size: clamp(1.05rem, 2.1vw, 1.45rem); line-height: 1.35;
  letter-spacing: 0; color: var(--ink-2);
}
.wysiwyg-expand em { font-style: normal; font-weight: 600; color: var(--signal); }
