/* ServiceLens public site.
   Bottle green as a material, Archivo for the interface, Newsreader only for
   what a customer wrote. */

:root {
  --bottle: #0f3d2e;
  --bottle-deep: #07231a;
  --chalk: #eff4ef;
  --paper: #ffffff;
  --wash: #e9efea;
  --star: #e0a426;

  --rule: #c3d2c6;
  --rule-dark: #2b5a49;
  --muted: #46685a;
  --muted-chalk: #a8c2b3;

  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --voice: "Newsreader", Georgia, "Times New Roman", serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --band: clamp(3.5rem, 8vw, 6.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--bottle);
  font-family: var(--display);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

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

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

/* ---------- bands ---------- */

.band--green {
  background: var(--bottle);
  color: var(--chalk);
}

.band--deep {
  background: var(--bottle-deep);
  color: var(--chalk);
}

.band--wash { background: var(--wash); }

.band--green a, .band--deep a { color: var(--chalk); }

.band-body { padding-block: var(--band); }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* The rings take the text colour, so the mark follows whatever it sits on. */
.wordmark .mark {
  width: 1.55em;
  height: 1.55em;
  flex: none;
  overflow: visible;
}

.masthead nav {
  display: flex;
  align-items: baseline;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  font-size: 0.95rem;
}

.masthead nav a { text-decoration: none; padding-block: 0.25rem; }
.masthead nav a:hover { text-decoration: underline; text-underline-offset: 0.35em; }

.masthead .signin {
  font-weight: 700;
  border-bottom: 2px solid var(--star);
  padding-bottom: 0.15rem;
}
.masthead .signin:hover { text-decoration: none; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(4rem, 9vw, 7rem); }

.hero h1 {
  font-size: clamp(2.5rem, 7.4vw, 5.25rem);
  max-width: 17ch;
}

.hero .lead {
  margin-top: 1.5rem;
  max-width: 44ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--muted-chalk);
}

/* ---------- finder ---------- */

.finder { margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 40rem; }

.finder label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-chalk);
  margin-bottom: 0.6rem;
}

.finder-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.finder input {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  color: var(--bottle);
  background: var(--paper);
  border: 2px solid var(--paper);
  border-radius: 2px;
  padding: 0.95rem 1.1rem;
}

.finder input::placeholder { color: var(--muted); }

.finder button {
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--bottle-deep);
  background: var(--star);
  border: 2px solid var(--star);
  border-radius: 2px;
  padding: 0.95rem 1.8rem;
}

.finder button:hover { background: #f0b53a; border-color: #f0b53a; }

.finder .note { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted-chalk); }

/* ---------- finder results ---------- */

.results { margin-top: 1.75rem; max-width: 46rem; }

.results ol { list-style: none; margin: 0; padding: 0; }

.result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  padding-block: 1.05rem;
  border-top: 1px solid var(--rule-dark);
}

.result:last-child { border-bottom: 1px solid var(--rule-dark); }

.result__name { font-weight: 700; font-size: 1.15rem; flex: 1 1 14rem; }

.result__meta { color: var(--muted-chalk); font-size: 0.92rem; }

.result__action {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--star);
  padding-bottom: 0.1rem;
}

.result__action--flat { border-bottom: none; color: var(--muted-chalk); font-weight: 400; }

.results__empty { padding-block: 1.25rem; color: var(--muted-chalk); }

.results__empty strong { color: var(--chalk); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .results[data-fresh="true"] .result,
  .results[data-fresh="true"] .results__empty {
    animation: rise 320ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  }
  .results[data-fresh="true"] .result:nth-child(2) { animation-delay: 40ms; }
  .results[data-fresh="true"] .result:nth-child(3) { animation-delay: 80ms; }
  .results[data-fresh="true"] .result:nth-child(4) { animation-delay: 120ms; }
  .results[data-fresh="true"] .result:nth-child(5) { animation-delay: 160ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: none; }
}

/* ---------- the loop: one review ---------- */

.loop { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }

@media (min-width: 60rem) {
  .loop { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}

.stars { color: var(--star); font-size: 1.2rem; letter-spacing: 0.1em; }

.quote {
  font-family: var(--voice);
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.26;
  letter-spacing: -0.01em;
  margin-top: 1.1rem;
  max-width: 26ch;
}

.byline { margin-top: 1.5rem; font-size: 0.95rem; color: var(--muted); }

.reply {
  margin-top: 2.25rem;
  padding-left: 1.4rem;
  border-left: 3px solid var(--star);
}

.reply__who { font-size: 0.9rem; font-weight: 700; }

.reply__text {
  font-family: var(--voice);
  font-size: 1.15rem;
  line-height: 1.5;
  margin-top: 0.4rem;
  max-width: 34ch;
}

.loop h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }

.loop__body { margin-top: 1.25rem; color: var(--muted); max-width: 38ch; }

.loop__body + .loop__body { margin-top: 1rem; }

/* ---------- categories ---------- */

.trades {
  margin-top: 1.75rem;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.trades span { display: block; color: var(--bottle); }

.section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- ranking ---------- */

.ranking { margin-top: 1.75rem; list-style: none; padding: 0; max-width: 52rem; }

.rank {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding-block: 1.15rem;
  border-top: 1px solid var(--rule);
}

.ranking .rank:last-child { border-bottom: 1px solid var(--rule); }

.rank__n {
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  font-size: 1.05rem;
  color: var(--muted);
}

.rank__name { font-weight: 700; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.35rem); }

.rank__where { grid-column: 2; font-size: 0.92rem; color: var(--muted); }

.rank__score {
  grid-row: 1 / span 2;
  grid-column: 3;
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.rank__score b { font-size: 1.2rem; font-weight: 800; }

.rank__score span { display: block; font-size: 0.85rem; color: var(--muted); }

/* ---------- doors ---------- */

.doors { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }

@media (min-width: 52rem) { .doors { grid-template-columns: 1fr 1fr; } }

.door { display: flex; flex-direction: column; }

.door h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }

.door p { margin-top: 1rem; margin-bottom: auto; color: var(--muted-chalk); max-width: 34ch; }

.door + .door { border-top: 1px solid var(--rule-dark); padding-top: clamp(2.5rem, 6vw, 4rem); }

@media (min-width: 52rem) {
  .door + .door {
    border-top: none;
    border-left: 1px solid var(--rule-dark);
    padding-top: 0;
    padding-left: clamp(2.5rem, 5vw, 4rem);
  }
}

.cta {
  display: inline-block;
  margin-top: 1.75rem;
  align-self: flex-start;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  background: var(--star);
  color: var(--bottle-deep);
  border: 2px solid var(--star);
}

.cta:hover { background: #f0b53a; border-color: #f0b53a; }

.cta--ghost { background: transparent; color: var(--chalk); border-color: var(--chalk); }
.cta--ghost:hover { background: var(--chalk); color: var(--bottle-deep); border-color: var(--chalk); }

/* ---------- prose pages ---------- */

.page-title { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); max-width: 18ch; }

.prose { margin-top: 1.75rem; max-width: var(--measure); }
.prose p { margin-top: 1.1rem; color: var(--muted); }
.prose p:first-child { margin-top: 0; font-size: 1.15rem; color: var(--bottle); }
.prose h2 { font-size: 1.5rem; margin-top: 3rem; }
.prose a { font-weight: 700; }

.facts { margin-top: 2.5rem; list-style: none; padding: 0; max-width: var(--measure); }
.facts li { padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts b { display: block; font-weight: 700; }
.facts span { color: var(--muted); }

.notice {
  margin-top: 2rem;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--star);
  background: var(--wash);
  max-width: var(--measure);
}

.field { margin-top: 1.75rem; max-width: 26rem; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--bottle);
  background: var(--paper);
  border: 2px solid var(--rule);
  border-radius: 2px;
  padding: 0.85rem 1rem;
}
.field input:focus { border-color: var(--bottle); }

.cta--solid { background: var(--bottle); color: var(--chalk); border-color: var(--bottle); }
.cta--solid:hover { background: var(--bottle-deep); border-color: var(--bottle-deep); }

/* ---------- footer ---------- */

.site-footer { padding-block: clamp(3rem, 6vw, 4.5rem); }

.site-footer .wordmark { font-size: 1.15rem; }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 0.35em; }

.site-footer .colophon {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--muted-chalk);
  max-width: 40ch;
}

[hidden] { display: none !important; }


/* ==========================================================================
   The two tools: the business portal and the admin queue.

   Same palette and type as the public site, different job. A tool is read
   every day by somebody who already knows what it is, so it carries no
   persuasion and nothing decorative: ruled rows, one accent that means a
   rating, and weight only where a decision is waiting.
   ========================================================================== */

.tool-bar { background: var(--bottle); color: var(--chalk); }

.tool-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.tool-bar nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  font-size: 0.95rem;
}

.tool-bar nav a { color: var(--chalk); text-decoration: none; padding-block: 0.25rem; }
.tool-bar nav a:hover { text-decoration: underline; text-underline-offset: 0.35em; }
.tool-bar nav a.here { border-bottom: 2px solid var(--star); }

.tool-bar form { display: inline; }

.tool-bar button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--muted-chalk);
  background: none;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
}
.tool-bar button:hover { color: var(--chalk); }

.tool-role {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bottle-deep);
  background: var(--star);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-left: 0.5rem;
}

/* --- the lead: who you are and what is waiting --- */

.tool-head {
  background: var(--bottle);
  color: var(--chalk);
  padding-block: clamp(1.75rem, 4vw, 2.75rem) clamp(2rem, 5vw, 3rem);
}

.tool-head h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); color: var(--chalk); }

.verdict { display: flex; align-items: flex-end; gap: 1rem; margin-top: 1.25rem; }
.verdict b { font-size: clamp(2.6rem, 2rem + 3vw, 4rem); font-weight: 800; line-height: 0.88; letter-spacing: -0.03em; }
.verdict > span { color: var(--muted-chalk); font-size: 0.95rem; padding-bottom: 0.4rem; }
.verdict .stars { color: var(--star); }

.lead-task { margin-top: 1.75rem; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); max-width: 40ch; }
.lead-task.done { color: var(--muted-chalk); }

.tool-figures { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem 2rem; font-size: 0.9rem; color: var(--muted-chalk); }
.tool-figures b { color: var(--chalk); font-weight: 700; }

/* --- rows, not cards --- */

.tool-body { padding-block: clamp(1.75rem, 3.5vw, 2.5rem); }

.rows { margin-top: 0; }
.tool-body > .rows:first-child > *:first-child { border-top: 0; padding-top: 0; }

.rows > * { border-top: 1px solid var(--rule); padding-block: 1.5rem; }
.rows > *:last-child { border-bottom: 1px solid var(--rule); }

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.who { font-weight: 700; }
.ago { font-size: 0.85rem; color: var(--muted); }
.stars { color: var(--star); letter-spacing: 0.09em; }

/* A customer's words, in the face that means exactly that. */
.said {
  font-family: var(--voice);
  font-size: 1.3rem;
  line-height: 1.45;
  margin-top: 0.7rem;
  max-width: 54ch;
}

.rated { margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; font-size: 0.85rem; color: var(--muted); }

.answered { margin-top: 1.1rem; padding-left: 1rem; border-left: 3px solid var(--star); }
.answered b { font-size: 0.85rem; }
.answered p { font-family: var(--voice); font-size: 1.05rem; line-height: 1.5; color: var(--muted); margin-top: 0.15rem; max-width: 54ch; }

/* --- replying --- */

.reply-form { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 46rem; }

.reply-form textarea {
  flex: 1 1 22rem;
  min-width: 0;
  min-height: 4.5rem;
  font-family: var(--voice);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--bottle);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}
.reply-form textarea:focus { border-color: var(--bottle); }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.7rem 1.35rem;
  border-radius: 2px;
  border: 2px solid var(--bottle);
  background: var(--bottle);
  color: var(--chalk);
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
}
.btn:hover { background: var(--bottle-deep); border-color: var(--bottle-deep); }

.btn.quiet { background: transparent; color: var(--bottle); border-color: var(--rule); }
.btn.quiet:hover { background: var(--wash); border-color: var(--bottle); }

.btn.warn { background: #a3341f; border-color: #a3341f; color: var(--chalk); }
.btn.warn:hover { background: #8a2b1a; border-color: #8a2b1a; }

.decide { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.decide form { display: inline; }

/* --- the queue --- */

.kind { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.kind.urgent { color: #a3341f; }

.quoted {
  font-family: var(--voice);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  max-width: 54ch;
}

.about { margin-top: 0.45rem; font-size: 0.95rem; }

/* --- plain tables, for the two reference lists --- */

.table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-size: 0.95rem; }
.table th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 1rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.table td { padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table b { font-weight: 700; }
.table .dim { color: var(--muted); }

.table-wrap { overflow-x: auto; }

/* --- forms in the tool --- */

.form-section { margin-top: clamp(2rem, 4vw, 3rem); }
.form-section:first-of-type { margin-top: 1.5rem; }
.form-section h2 { font-size: 1.25rem; }
.form-section .form-note { margin-top: 0.4rem; color: var(--muted); font-size: 0.9rem; max-width: 52ch; }

.fields { margin-top: 1.25rem; display: grid; gap: 1.1rem; max-width: 42rem; }
@media (min-width: 46rem) { .fields.two { grid-template-columns: 1fr 1fr; } }

.field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--bottle);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.7rem 0.9rem;
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--bottle); outline-offset: 1px; }
.field .help { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.field .bad { font-size: 0.85rem; color: #a3341f; margin-top: 0.35rem; }

.switch { display: flex; gap: 0.7rem; align-items: flex-start; padding-block: 0.9rem; border-top: 1px solid var(--rule); }
.switch:last-of-type { border-bottom: 1px solid var(--rule); }
.switch input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--bottle); }
.switch b { display: block; font-weight: 700; }
.switch span { font-size: 0.9rem; color: var(--muted); }

.form-actions { margin-top: 1.75rem; }

.flash {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--star);
  background: var(--wash);
  max-width: 46rem;
}
.flash.bad { border-left-color: #a3341f; }

/* --- sign in --- */

.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--gutter); }
.gate-card { width: 100%; max-width: 25rem; }
.gate-card .wordmark { margin-bottom: 1.75rem; }
.gate-card h1 { font-size: 1.9rem; }
.gate-card > p { margin-top: 0.5rem; color: var(--muted); }
.gate-card form { margin-top: 1.75rem; }
.gate-card .btn { width: 100%; text-align: center; }
.gate-foot { margin-top: 1.75rem; font-size: 0.95rem; color: var(--muted); }
.gate-foot a { font-weight: 700; }

.empty-queue { padding-block: clamp(3rem, 8vw, 5rem); max-width: 44ch; }
.empty-queue h2 { font-size: 1.5rem; }
.empty-queue p { margin-top: 0.6rem; color: var(--muted); }
