@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

:root {
  --bg: #f6f3f4;
  --card: #ffffff;
  --border: #e2e2e6;
  --text: #1c1c1f;
  --muted: #6b6b74;
  --accent: #660033;
  --accent-dark: #4d0026;
  --accent-soft: #fdf0f5;
  --best: #e6f4ea;
  --danger: #b3261e;
  --ok: #1a7f37;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }

header.top {
  background: linear-gradient(135deg, #4d0026, #7a0a42);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 12px rgba(77, 0, 38, 0.25);
  color: #fff;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
header.top h1 { margin: 0; font-size: 1.2rem; }
header.top .sub { font-weight: 400; opacity: 0.8; font-size: 0.9rem; margin-left: 0.4rem; }
nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
nav .meta { font-size: 0.85rem; opacity: 0.85; margin: 0 0.5rem 0 1rem; }

.tab, .link-btn {
  background: transparent;
  color: #fff;
  border: 1px solid transparent;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
}
.tab:hover, .link-btn:hover { background: rgba(255, 255, 255, 0.12); }
.tab.active { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.15); }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.card.narrow { max-width: 420px; margin: 3rem auto; }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.card h3 { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }

.hint { color: var(--muted); font-size: 0.9rem; margin-top: -0.25rem; }
.muted { color: var(--muted); font-weight: 400; }
.empty { color: var(--muted); padding: 0.5rem 0; }

input[type="text"], input[type="number"], input[type="password"], input[type="search"], select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}
input[type="file"] { font-size: 0.9rem; }

button {
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
button:hover { background: var(--accent-dark); }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.secondary:hover { background: var(--accent-soft); }
button.small { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
button:disabled { opacity: 0.5; cursor: wait; }
.icon-btn {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}
.icon-btn:hover { background: #fdecea; border-color: var(--danger); }

.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.row > * { flex: 1 1 180px; }
.row > button { flex: 0 0 auto; }
.row.end { justify-content: flex-end; margin-top: 1rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.field.small { flex: 0 0 120px; }

.msg { font-size: 0.9rem; margin: 0.5rem 0 0; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

.pickers { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 0.75rem; }
.picker-group { display: flex; flex-direction: column; gap: 0.25rem; min-width: 200px; }
.picker-zone { font-weight: 700; font-size: 0.85rem; color: var(--accent); }
.picker-group label { font-size: 0.9rem; cursor: pointer; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
td.actions { text-align: right; white-space: nowrap; }

table.compare th { color: var(--text); text-transform: none; font-size: 0.95rem; letter-spacing: 0; }
table.compare th .pkg { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
table.compare .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.compare tr.total td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: none; }
table.compare td.best { background: var(--best); color: var(--ok); }

table.edit input { min-width: 90px; padding: 0.35rem 0.45rem; font-size: 0.85rem; }
table.edit td { padding: 0.3rem; }
table.edit td:first-child input { min-width: 180px; }

.notes { margin-top: 1rem; display: grid; gap: 0.6rem; font-size: 0.85rem; }
.note { border-left: 3px solid var(--accent); padding-left: 0.6rem; }

/* ---- login ---- */
.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 900px;
  margin: 2.5rem auto;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(77, 0, 38, 0.15);
}
.auth-brand {
  background: linear-gradient(160deg, #4d0026, #8a0d4c);
  color: #fff;
  padding: 2.5rem 2rem;
}
.auth-brand .logo {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: 0.02em; margin-bottom: 1.5rem;
}
.auth-brand h2 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 0.75rem; }
.auth-brand p { opacity: 0.85; line-height: 1.5; }
.auth-brand ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.auth-brand li::before { content: "\2713"; margin-right: 0.6rem; font-weight: 700; opacity: 0.9; }
.auth-form { padding: 2.5rem 2rem; display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.auth-form h2 { margin: 0; font-size: 1.4rem; }
.auth-form .hint { margin: -0.5rem 0 0.25rem; }
button.big { padding: 0.75rem 1rem; font-size: 1rem; border-radius: 8px; }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 0, 51, 0.15);
}
@media (max-width: 720px) { .auth { grid-template-columns: 1fr; margin: 1rem auto; } .auth-brand { padding: 1.5rem; } }

/* ---- home / compare ---- */
.hero {
  background: linear-gradient(135deg, #ffffff, #fbeef4);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.hero h2 { margin: 0; font-size: 1.75rem; letter-spacing: -0.01em; }
.hero p { margin: 0.35rem 0 1.25rem; color: var(--muted); }
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input {
  padding: 0.95rem 1rem 0.95rem 2.9rem;
  font-size: 1.05rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(77, 0, 38, 0.08);
}
.stats { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.stats span {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: rgba(102, 0, 51, 0.08); padding: 0.25rem 0.7rem; border-radius: 999px;
}

.pickers { display: grid; gap: 0.9rem; margin-bottom: 1.25rem; }
.picker-zone { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.4rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); font-size: 0.9rem; font-weight: 500;
  transition: all 0.12s;
}
.chip:hover span { border-color: var(--accent); }
.chip.on span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(102, 0, 51, 0.3); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(102, 0, 51, 0.3); }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.sum-card {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 1.1rem 1.2rem;
}
.sum-card.best { border-color: #7cc48f; background: linear-gradient(180deg, #f2faf4, #fff); box-shadow: 0 6px 20px rgba(26, 127, 55, 0.12); }
.badge {
  position: absolute; top: -0.6rem; right: 1rem; background: var(--ok); color: #fff;
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; letter-spacing: 0.03em;
}
.sum-zone { font-weight: 700; font-size: 0.85rem; color: var(--accent); }
.sum-pkg { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }
.sum-total { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sum-total small { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.sum-card.best .sum-total { color: var(--ok); }
.sum-diff { margin-top: 0.3rem; font-size: 0.8rem; color: var(--danger); font-weight: 600; }

.card.flush { padding: 0; overflow: hidden; }
.card.flush table.compare th { background: #faf7f8; padding: 0.9rem 1rem; }
.card.flush table.compare td { padding: 0.8rem 1rem; }
table.compare tbody tr:hover td { background: #fcf8fa; }
table.compare td:first-child, table.compare th:first-child { position: sticky; left: 0; background: #fff; }
table.compare th:first-child { background: #faf7f8; }
table.compare td.na { color: #b5b0b3; }
table.compare tr.total td { background: #faf7f8; font-size: 1.05rem; }
table.compare tr.total td.best { background: var(--best); }
.pad { padding: 1.5rem !important; text-align: center; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 0.5rem 0 0.25rem; }
.empty-icon { font-size: 2.5rem; }

.note { background: #fff; border-radius: 8px; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); }

/* ---- v6: activity / search / compare ---- */
.tab .count:not(:empty) {
  display: inline-block; min-width: 1.3rem; margin-left: 0.25rem; padding: 0 0.35rem;
  border-radius: 999px; background: #fff; color: var(--accent); font-size: 0.75rem; line-height: 1.3rem;
}
.banner {
  background: #fff4e5; border: 1px solid #f5c26b; color: #7a4b00;
  padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.92rem;
}
.link-btn.dark { color: #7a4b00; text-decoration: underline; padding: 0 0.25rem; }
.link-btn.dark:hover { background: transparent; }

.hero.center { text-align: center; }
.center { text-align: center; justify-content: center; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)); gap: 0.75rem; align-items: end; }
.filters .field { color: var(--text); font-weight: 600; font-size: 0.78rem; }
.filters input, .filters select { font-weight: 400; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } .filters .grow { grid-column: 1 / -1; } }
.searchbox.small input { padding: 0.55rem 0.8rem 0.55rem 2.4rem; font-size: 0.95rem; border-radius: 8px; box-shadow: none; }
.searchbox.small svg { left: 0.8rem; }
.searchbox.big { max-width: 720px; margin: 0 auto; }
.searchbox.big input { font-size: 1.15rem; padding: 1.05rem 1rem 1.05rem 3.1rem; border-radius: 999px; }
.searchbox.big svg { left: 1.2rem; }
.row.between { justify-content: space-between; margin: 0.9rem 0 0; }
.row.between > * { flex: 0 1 auto; }
.quick { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.9rem; }
.row.between .quick { margin-top: 0; }
.qchip {
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.3rem 0.8rem; font-size: 0.82rem; font-weight: 500;
}
.qchip:hover { background: var(--accent-soft); border-color: var(--accent); }
.qchip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.toggle { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.toggle input { accent-color: var(--accent); width: 1rem; height: 1rem; }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.results-head h3 { margin: 0; font-size: 1.15rem; }
.results-head .actions { display: flex; gap: 0.5rem; }

.stale { font-size: 0.68rem; font-weight: 700; color: #7a4b00; background: #fff4e5; border: 1px solid #f5c26b; border-radius: 999px; padding: 0.05rem 0.45rem; vertical-align: middle; }
.warn { color: #7a4b00; }
mark { background: #ffe58a; color: inherit; border-radius: 2px; padding: 0 1px; }

.search-info { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
.fchip { background: rgba(102, 0, 51, 0.08); color: var(--accent); font-weight: 600; border-radius: 999px; padding: 0.2rem 0.65rem; }
.results { display: grid; gap: 0.75rem; }
.result {
  display: flex; justify-content: space-between; gap: 1rem; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; transition: box-shadow 0.12s, border-color 0.12s;
}
.result:hover { border-color: #d7bccb; box-shadow: 0 6px 18px rgba(77, 0, 38, 0.08); }
.result-zone { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.result h3 { margin: 0.15rem 0 0.4rem; font-size: 1.1rem; }
.result-meta { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.result-meta b { color: var(--text); font-weight: 600; }
.result-notes { font-size: 0.85rem; margin-top: 0.4rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.tag { font-size: 0.75rem; background: #f1edef; border-radius: 6px; padding: 0.15rem 0.5rem; }
.result-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 0.5rem; min-width: 150px; }
.result-total { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-total small { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.badge.inline { position: static; }
@media (max-width: 640px) { .result { flex-direction: column; } .result-side { flex-direction: row; align-items: center; min-width: 0; } }

.hero .pickers { margin: 0.5rem 0 0; }
table.edit input.tiny { min-width: 60px; width: 70px; }
#reviewBody > .field { margin-bottom: 0.75rem; }

@media print {
  header.top, .hero, .results-head .actions, .banner, .search-info, #sResults, .hint { display: none !important; }
  body, main { background: #fff; padding: 0; }
  .card, .sum-card, .note { box-shadow: none !important; break-inside: avoid; }
  table.compare td:first-child, table.compare th:first-child { position: static; }
}
.link-btn.inline { color: var(--accent); padding: 0; text-decoration: underline; font-weight: 600; }
.link-btn.inline:hover { background: transparent; }

/* ---- activity sync ---- */
.sync { border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.sync-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.sync-head .muted { font-size: 0.82rem; }
.sync .row { margin-bottom: 0; }
.pill { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.15rem 0.6rem; }
.pill.ok { background: var(--best); color: var(--ok); }
.pill.warn { background: #fff4e5; color: #7a4b00; }
.pill.bad { background: #fdecea; color: var(--danger); }
.pill.idle { background: #f1edef; color: var(--muted); }
.change { font-size: 0.85rem; margin: 0.6rem 0 0; }
.change .plus { color: var(--ok); }
.change .minus { color: #7a4b00; }
.names { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; }
.pending { background: #fff4e5; border: 1px solid #f5c26b; border-radius: 8px; padding: 0.6rem 0.8rem; margin-top: 0.6rem; font-size: 0.85rem; }
.pending .row { margin-top: 0.5rem; }
input[type="url"] { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; background: #fff; color: var(--text); }

/* ---- v8: simple search + admin console ---- */
header.top h1 { font-size: 1.3rem; }
.search-hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.search-hero h2 { font-size: 1.9rem; margin: 0 0 1.25rem; letter-spacing: -0.01em; text-wrap: balance; }
.search-hero .quick { margin-top: 1rem; }
.res-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.res-head h3 { margin: 0; font-size: 1.15rem; }
.res-head .muted { font-size: 0.85rem; }

table.results-table { font-size: 0.95rem; }
table.results-table th { background: #faf7f8; padding: 0.8rem 0.9rem; white-space: nowrap; }
table.results-table td { padding: 0.9rem; vertical-align: middle; }
table.results-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.results-table td.na { color: #b5b0b3; }
table.results-table td.total { font-weight: 800; font-size: 1.05rem; }
table.results-table tr.best td { background: #f2faf4; }
table.results-table tr.best td.total { color: var(--ok); }
table.results-table tbody tr:not(.more-row):hover td { background: #fcf8fa; }
table.results-table tr.best:hover td { background: #eaf6ee; }
td.zone { min-width: 220px; }
.zname { font-weight: 700; font-size: 1rem; }
.zpkg { color: var(--muted); font-size: 0.85rem; margin-top: 0.1rem; }
.zact { font-size: 0.78rem; color: var(--accent); margin-top: 0.25rem; }
.small-text { font-size: 0.8rem; margin-top: 0.3rem; }
tr.more-row td { background: #faf7f8; padding: 0.5rem 0.9rem 0.8rem 1.8rem; }
.more-pkg { display: flex; justify-content: space-between; gap: 1rem; max-width: 520px; font-size: 0.88rem; padding: 0.2rem 0; }

.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.admin-head h2 { margin: 0; font-size: 1.4rem; }
.admin-head .hint { margin: 0.3rem 0 0; max-width: 60ch; }
.admin-head form { flex: 0 1 420px; margin: 0; }
.zone-card { padding: 1.1rem 1.25rem; }
.zc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 0.75rem; }
.zc-head h3 { margin: 0; font-size: 1.15rem; }
.zc-head .muted { font-size: 0.82rem; }
.zc-actions { margin-left: auto; display: flex; gap: 0.4rem; }
.source { border-top: 1px solid var(--border); padding: 0.8rem 0 0.2rem; }
.source-title { font-weight: 700; font-size: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.source-title .muted { font-weight: 400; font-size: 0.8rem; }
.source .row { margin-bottom: 0; }
label.upload {
  flex: 0 0 auto; cursor: pointer; border: 1px solid var(--accent); color: var(--accent); background: transparent;
  border-radius: 6px; padding: 0.3rem 0.6rem; font-size: 0.8rem; font-weight: 600;
}
label.upload:hover { background: var(--accent-soft); }
td.actions .reset input { width: 160px; display: inline-block; padding: 0.3rem 0.5rem; font-size: 0.85rem; }

/* ---- live website check ---- */
.live { font-size: 0.85rem; padding: 0.45rem 0.75rem; border-radius: 8px; margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.live.checking { background: #f1edef; color: var(--muted); }
.live.ok { background: var(--best); color: var(--ok); }
.live.bad { background: #fff4e5; color: #7a4b00; }
.live .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); flex: none; }
.spinner { width: 0.9rem; height: 0.9rem; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.zsrc { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.msg.warnmsg { color: #7a4b00; }

.visa-pick { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.9rem; font-weight: 600; font-size: 0.9rem; }
.visa-pick select { width: auto; padding: 0.35rem 0.6rem; }
.znote { font-size: 0.72rem; color: #7a4b00; margin-top: 0.2rem; max-width: 34ch; }
.res-head.second { margin-top: 1.75rem; }
.res-head.second h3 { color: var(--muted); }
.empty-state.small { padding: 1.5rem 1rem; }
table.results-table td.allin { text-align: center; color: var(--muted); font-size: 0.85rem; font-style: italic; }
.znote.warn { color: var(--danger); font-weight: 600; }

a.alink { color: var(--accent); text-decoration: none; border-bottom: 1px dotted currentColor; }
a.alink:hover { border-bottom-style: solid; }
.acode { font-size: 0.68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.zsrc a { color: inherit; text-decoration: underline; }

table.edit tr.flagged td { background: #fdecea; }
table.edit tr.flag-row td { color: var(--danger); font-size: 0.8rem; padding: 0.2rem 0.6rem 0.6rem; }
.flagtxt { color: var(--danger); font-weight: 600; } .oktxt { color: var(--ok); font-weight: 600; }

/* ---- questionnaire ---- */
.quiz { max-width: 860px; margin: 1rem auto; }
.quiz-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.quiz-head h2 { margin: 0; flex: 1 1 auto; }
.quiz-progress { flex: 0 0 160px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.quiz-progress div { height: 100%; background: var(--accent); transition: width .3s; }
.qstep h3 { font-size: 1rem; margin: 1.1rem 0 .6rem; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.qgrid.two { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.qgrid.three { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.qopt { text-align: left; background: var(--card); color: var(--text); border: 1.5px solid var(--border); border-radius: 10px; padding: .7rem .85rem; display: flex; flex-direction: column; gap: .2rem; font-weight: 400; }
.qopt b { font-size: .92rem; } .qopt span { font-size: .78rem; color: var(--muted); }
.qopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.qopt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.qstep .field { margin-top: .9rem; }
.qstep textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.qmatch { margin-top: .5rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.quiz-nav { margin-top: 1.5rem; }
.qsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: .5rem 0 1rem; }
.qsum h3 { margin: .2rem 0 .5rem; font-size: .95rem; }
.qsum dl { display: grid; grid-template-columns: 110px 1fr; gap: .3rem .6rem; margin: 0; font-size: .9rem; }
.qsum dt { color: var(--muted); } .qsum dd { margin: 0; }
.qrec { border: 2px solid #7cc48f; background: #f2faf4; border-radius: 12px; padding: 1rem 1.2rem; margin: .5rem 0 1rem; display: grid; gap: .3rem; }
.qprice { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; } .qprice small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.qalt { display: grid; gap: .6rem; } .qalt-item { border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; display: grid; gap: .2rem; }
.qalt-item .qprice { font-size: 1.15rem; }
.approval { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .2rem .7rem; }
.approval.easy { background: var(--best); color: var(--ok); } .approval.medium { background: #fff4e5; color: #7a4b00; } .approval.strict { background: #fdecea; color: var(--danger); }
.qdocs { margin: 0; padding-left: 1.1rem; font-size: .88rem; display: grid; gap: .2rem; }

/* =====================================================================
   Design layer: refined, product-grade look. Overrides only; the markup
   and behaviour are unchanged.
   ===================================================================== */
:root {
  --bg: #f8f8fa;
  --card: #ffffff;
  --border: #e9e9ee;
  --border-strong: #d9d9e1;
  --text: #0f1115;
  --muted: #667085;
  --accent: #5c0a33;
  --accent-dark: #3f0623;
  --accent-soft: #f8eef3;
  --ring: rgba(92, 10, 51, 0.14);
  --best: #ecfdf3;
  --ok: #067647;
  --danger: #b42318;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -6px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 24px 48px -12px rgba(16, 24, 40, 0.14);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(1200px 480px at 50% -220px, rgba(92, 10, 51, 0.07), transparent 70%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.006em;
}
h1, h2, h3 { letter-spacing: -0.02em; }
a { color: var(--accent); }

/* Header: light, glassy, quiet */
header.top {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  color: var(--text);
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
}
header.top h1 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
header.top h1::before {
  content: "PM"; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, #7a1245, var(--accent-dark));
  color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(92, 10, 51, 0.3);
}
nav { gap: 0.15rem; }
.tab, header .link-btn {
  color: #475467; font-weight: 500; font-size: 0.9rem;
  padding: 0.45rem 0.85rem; border-radius: 9px; border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.tab:hover, header .link-btn:hover { background: #f2f2f5; color: var(--text); }
.tab.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }

main { max-width: 1180px; padding: 2rem clamp(1rem, 4vw, 2rem) 4rem; }

/* Surfaces */
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}
.card h2 { font-size: 1.15rem; font-weight: 700; }

/* Controls */
input[type="text"], input[type="number"], input[type="password"], input[type="search"], input[type="url"], select, textarea {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-family: inherit; font-size: 0.93rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
button {
  font-family: inherit; font-weight: 600; border-radius: 10px;
  padding: 0.6rem 1.05rem;
  background: linear-gradient(180deg, #6d0f3d, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(16, 24, 40, 0.12);
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
}
button:hover { background: linear-gradient(180deg, #5c0a33, var(--accent-dark)); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
button.secondary, .icon-btn, label.upload {
  background: #fff; color: #344054;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
button.secondary:hover, .icon-btn:hover, label.upload:hover { background: #f9f9fb; color: var(--text); border-color: #c8c8d2; }
button.small, label.upload { padding: 0.42rem 0.8rem; font-size: 0.84rem; border-radius: 9px; }
.icon-btn { color: var(--danger); }
.link-btn.inline { background: none; box-shadow: none; }
button:disabled { opacity: 0.5; }

/* Sign in */
.auth { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.auth-brand {
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(150deg, #7a1245 0%, #4a0829 55%, #2a0417 100%);
}
.auth-brand h2 { font-size: 1.9rem; line-height: 1.15; letter-spacing: -0.03em; }
.auth-form h2 { font-size: 1.35rem; }
button.big { padding: 0.8rem 1rem; font-size: 0.98rem; }

/* Banners */
.banner { border-radius: 12px; box-shadow: none; font-size: 0.9rem; }

/* Search hero */
.search-hero { padding: clamp(1.5rem, 5vw, 3.5rem) 0 1.25rem; }
.search-hero h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  background: linear-gradient(180deg, #0f1115 30%, #4b1a33);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.searchbox.big input, .searchbox input[type="search"], .searchbox input[type="text"] {
  border-radius: 16px; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 1.1rem;
}
.searchbox.big input:focus { box-shadow: 0 0 0 5px var(--ring), var(--shadow-lg); }
.visa-pick { font-weight: 500; color: #344054; }
.visa-pick select { width: auto; }
.qchip, .chip span, .fchip {
  background: #fff; border: 1px solid var(--border-strong); color: #344054;
  border-radius: 999px; font-weight: 500; box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.qchip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.qchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Results */
.res-head h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.live { border-radius: 10px; font-size: 0.84rem; border: 1px solid transparent; }
.live.ok { background: #f0fdf4; border-color: #d1fadf; color: #05603a; }
.live.bad { background: #fffaeb; border-color: #fef0c7; color: #93370d; }
.card.flush { padding: 0; overflow: hidden; }
table.results-table th {
  background: #fafafb; color: #667085;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
table.results-table td { border-bottom: 1px solid #f0f0f3; padding-top: 1rem; padding-bottom: 1rem; }
table.results-table tbody tr:last-child td { border-bottom: none; }
table.results-table tr.best td { background: #f6fef9; }
table.results-table tr.best td:first-child { box-shadow: inset 3px 0 0 #12b76a; }
table.results-table td.total { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
table.results-table tr.best td.total { color: var(--ok); }
.zname { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.badge { background: #12b76a; border-radius: 999px; font-weight: 600; letter-spacing: 0.01em; }
a.alink { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(92, 10, 51, 0.25); }
a.alink:hover { border-bottom-color: var(--accent); }
.acode { background: #f2f2f5; color: #475467; border-radius: 6px; padding: 0.05rem 0.35rem; font-size: 0.75em; font-weight: 500; }
.zsrc { color: #98a2b3; }

/* Status pills */
.pill { border-radius: 999px; font-weight: 600; font-size: 0.72rem; padding: 0.15rem 0.55rem; background: #f2f4f7; color: #475467; border: 1px solid #eaecf0; }
.pill.ok { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.pill.warn { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.pill.bad { background: #fef3f2; color: #b42318; border-color: #fecdca; }

/* Admin */
.admin-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.zone-card { transition: box-shadow 0.2s; }
.zone-card:hover { box-shadow: var(--shadow-lg); }
.zc-head { padding-bottom: 0.9rem; border-bottom: 1px solid #f0f0f3; }
.zc-head h3 { font-size: 1.15rem; font-weight: 700; }
.source { padding: 1rem 0 0.25rem; }
.source + .source { border-top: 1px solid #f0f0f3; margin-top: 0.75rem; }
.source-title { font-weight: 600; }
.pending { border-radius: 12px; background: #fcfcfd; border: 1px solid var(--border); }
table.grid th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #667085; }

/* Questionnaire */
.quiz { padding: clamp(1.25rem, 3vw, 2rem); }
.quiz-head h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.quiz-progress { height: 6px; border-radius: 999px; background: #f0f0f3; }
.quiz-progress div { border-radius: 999px; background: linear-gradient(90deg, #7a1245, var(--accent)); transition: width 0.35s ease; }
.qstep h3 { font-size: 1.02rem; font-weight: 650; }
.qopt {
  background: #fff; color: var(--text); text-align: left;
  border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.qopt:hover { background: #fff; border-color: #c4a3b4; box-shadow: var(--shadow-md); }
.qopt.on { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.qopt b { color: var(--text); }
.qopt span { color: var(--muted); }
.qrec { border-radius: 16px; }

@media (max-width: 720px) {
  header.top { padding: 0.6rem 1rem; }
  .card { border-radius: 14px; padding: 1.1rem; }
  .search-hero h2 { font-size: 1.8rem; }
}
.tab, .link-btn, header .link-btn { background: transparent; box-shadow: none; }
.tab.active { background: var(--accent-soft); }
.link-btn.dark, .banner .link-btn { background: none; box-shadow: none; padding: 0.1rem 0.2rem; }
.zc-head { border-bottom: none; }
label.upload, button.small { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; min-height: 34px; }
.searchbox.big input:focus { box-shadow: 0 0 0 4px var(--ring), var(--shadow-md); }
.source .row + .row { margin-top: 0.6rem; }
@media (max-width: 720px) {
  nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .tab, header .link-btn { white-space: nowrap; }
}

/* Price proof and activity details */
.proof-btn {
  display: block; margin: 0.35rem 0 0 auto; padding: 0.15rem 0.55rem; min-height: 0;
  font-size: 0.72rem; font-weight: 600; border-radius: 999px;
  background: #fff; color: var(--accent); border: 1px solid rgba(92, 10, 51, 0.25); box-shadow: none;
}
.proof-btn:hover, .proof-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
tr.proof-row td { background: #fcfcfd; padding: 0.75rem 1rem 1rem; }
.proof { font-size: 0.86rem; color: #344054; margin: 0.35rem 0; }
.proof-head { margin-bottom: 0.35rem; }
.proof-ctx { color: #98a2b3; font-size: 0.8rem; margin-bottom: 0.25rem; }
.proof blockquote {
  margin: 0; padding: 0.55rem 0.75rem; border-left: 3px solid var(--accent);
  background: #fff; border-radius: 0 8px 8px 0; box-shadow: var(--shadow-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word;
}
.proof mark { background: #fef0c7; color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 700; }
.proof.none { color: #b54708; }
.more-pkg + .proof { margin: 0.2rem 0 0.8rem; }
details.adet { margin-top: 0.45rem; font-size: 0.84rem; }
details.adet > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.8rem; list-style: none; }
details.adet > summary::before { content: "▸ "; }
details.adet[open] > summary::before { content: "▾ "; }
.adet-item { margin: 0.5rem 0; padding: 0.6rem 0.75rem; background: #fcfcfd; border: 1px solid var(--border); border-radius: 10px; max-width: 640px; }
.adet-meta { color: #667085; font-size: 0.78rem; margin-top: 0.15rem; }
.adet-item p { margin: 0.35rem 0 0; color: #344054; line-height: 1.5; }
.adet-req { margin-top: 0.35rem; color: #93370d; font-size: 0.8rem; }
.adet-src { color: #98a2b3; font-size: 0.76rem; }
td.desc-cell { max-width: 420px; font-size: 0.8rem; color: #475467; }

/* History, reports, companies */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0.5rem 0 1.25rem; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.page-head .hint { margin: 0.3rem 0 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
.row.wrap { flex-wrap: wrap; }
.row.wrap > input, .row.wrap > select { flex: 1 1 160px; }
.field.small { font-size: 0.78rem; color: #667085; font-weight: 500; display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 150px; }
.field.grow { flex: 2 1 220px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.tile span { display: block; color: #667085; font-size: 0.8rem; font-weight: 500; }
.tile b { display: block; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 0.15rem; }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.grid th { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); background: #fafafb; }
table.grid td { padding: 0.55rem 0.6rem; border-bottom: 1px solid #f0f0f3; vertical-align: top; }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid tr.warnrow td { background: #fffbfa; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1.5rem; }
.tpill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.5rem; border-radius: 999px; background: #f2f4f7; color: #475467; white-space: nowrap; }
.tpill.t-search { background: #eff8ff; color: #175cd3; }
.tpill.t-questionnaire { background: #f4f3ff; color: #5925dc; }
.tpill.t-feedback, .tpill.t-open { background: #fffaeb; color: #b54708; }
.tpill.t-login { background: #ecfdf3; color: #067647; }
.tpill.t-login_failed { background: #fef3f2; color: #b42318; }
.tpill.t-done { background: #ecfdf3; color: #067647; }
.fb { border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.75rem; background: #fff; }
.fb.resolved { opacity: 0.8; }
.fb-head { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; font-size: 0.88rem; }
.fb p { margin: 0.4rem 0; }
.fb-reply { border-left: 3px solid var(--accent); background: #fcfcfd; padding: 0.4rem 0.7rem; margin: 0.4rem 0; border-radius: 0 8px 8px 0; font-size: 0.86rem; }
.fb-reply p { margin: 0.2rem 0 0; }
.fb .row { margin-top: 0.5rem; }
#histFilter { margin-bottom: 0.75rem; }
input[type="date"] { border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.55rem 0.7rem; font-family: inherit; font-size: 0.9rem; box-shadow: var(--shadow-sm); background: #fff; color: var(--text); }

/* Admin sub-tabs and report levels */
.subtabs { display: flex; gap: 0.25rem; padding: 0.3rem; margin: 0.25rem 0 1.5rem; background: #f0f0f3; border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.subtab { background: transparent; color: #475467; box-shadow: none; border-radius: 9px; padding: 0.5rem 1rem; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.subtab:hover { background: rgba(255, 255, 255, 0.6); color: var(--text); }
.subtab.active { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }
.formtitle { margin: 0 0 0.75rem; font-size: 1rem; font-weight: 700; }
.row.between { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.row.between > input { flex: 1; }
.row.between > select { width: auto; min-width: 200px; }
td.actions { white-space: nowrap; }
td.actions button { margin-left: 0.25rem; }
.level-card { border-left: 4px solid var(--accent); }
.level-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.level-head h3 { margin: 0.35rem 0 0.15rem; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.level-contact { margin-top: 0.3rem; color: #344054; }
.level-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.9rem 0 0.5rem; color: #667085; font-size: 0.86rem; }
.level-facts b { color: var(--text); margin-left: 0.25rem; }
.row.wrap > #newRole { flex: 0 1 200px; }
td.actions { white-space: nowrap; width: 1%; }

/* =====================================================================
   Apple-grade layer. System type (SF Pro on Apple devices), generous
   whitespace, borderless surfaces, pill controls. Overrides only.
   ===================================================================== */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --hair: rgba(0, 0, 0, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #8a1550;
  --accent-dark: #6d0f3f;
  --accent-soft: rgba(138, 21, 80, 0.07);
  --ring: rgba(138, 21, 80, 0.18);
  --ok: #248a3d;
  --danger: #d70015;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings: normal;
}
body { background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif; letter-spacing: -0.015em; }
::selection { background: rgba(138, 21, 80, 0.16); }

/* Global nav: thin, frosted, small type */
header.top {
  height: 52px; padding: 0 max(22px, calc((100vw - 1024px) / 2));
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
header.top h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; gap: 0.5rem; }
header.top h1::before { width: 26px; height: 26px; border-radius: 7px; font-size: 10px; background: linear-gradient(160deg, #a51d63, #5e0b35); box-shadow: none; }
.tab, header .link-btn { font-size: 12.5px; font-weight: 400; letter-spacing: -0.01em; color: rgba(0, 0, 0, 0.8); padding: 6px 11px; border-radius: 980px; }
.tab:hover, header .link-btn:hover { background: transparent; color: var(--accent); }
.tab.active { background: transparent; color: var(--text); font-weight: 600; }

main { max-width: 1024px; padding: 40px 22px 96px; }

/* Surfaces: borderless, rounded, quiet */
.card, .tile, .auth { border: none; border-radius: 18px; box-shadow: none; background: var(--card); }
.card { padding: 28px 30px; }
.card h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.hint, .muted { color: var(--muted); }
.banner { background: #fff; border: none; border-radius: 14px; color: var(--text); box-shadow: none; padding: 12px 18px; font-size: 14px; }
.banner .link-btn { color: var(--accent); text-decoration: none; }

/* Controls: Apple pills and soft fields */
button {
  border-radius: 980px; padding: 9px 20px; font-size: 15px; font-weight: 400; letter-spacing: -0.01em;
  background: var(--accent); box-shadow: none; transition: background 0.2s, opacity 0.2s;
}
button:hover { background: var(--accent-dark); }
button:active { transform: none; opacity: 0.85; }
button.secondary, .icon-btn, label.upload { background: rgba(0, 0, 0, 0.05); color: var(--text); border: none; box-shadow: none; }
button.secondary:hover, .icon-btn:hover, label.upload:hover { background: rgba(0, 0, 0, 0.09); color: var(--text); }
.icon-btn { color: var(--danger); }
button.small, label.upload { padding: 6px 14px; font-size: 13px; min-height: 30px; border-radius: 980px; }
input[type="text"], input[type="number"], input[type="password"], input[type="search"], input[type="url"], input[type="date"], select, textarea {
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 12px; padding: 11px 14px; font-size: 15px; box-shadow: none; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.link-btn.inline { color: var(--accent); }

/* Sign in: a calm, centred Apple-ID style card */
.auth { max-width: 900px; margin: 48px auto; overflow: hidden; box-shadow: var(--shadow-lg); border-radius: 28px; }
.auth-brand { background: radial-gradient(120% 90% at 0% 0%, #b4246d 0%, #7a1145 42%, #2b0518 100%); padding: 56px 48px; }
.auth-brand .logo { border-radius: 14px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); }
.auth-brand h2 { font-size: 40px; font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; margin-top: 28px; }
.auth-brand p { font-size: 19px; opacity: 0.85; line-height: 1.4; }
.auth-form { padding: 56px 48px; }
.auth-form h2 { font-size: 28px; font-weight: 600; }
button.big { padding: 14px 20px; font-size: 17px; border-radius: 12px; }

/* Search hero */
.search-hero { padding: 48px 0 28px; text-align: center; }
.search-hero h2 {
  font-size: clamp(36px, 6vw, 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
  background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); margin-bottom: 28px;
}
.searchbox.big input, .searchbox input[type="search"], .searchbox input[type="text"] {
  height: 60px; border-radius: 16px; font-size: 19px; border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.searchbox.big input:focus { box-shadow: 0 0 0 4px var(--ring), 0 4px 24px rgba(0, 0, 0, 0.06); }
.visa-pick { font-size: 15px; color: var(--muted); }
.qchip, .chip span, .fchip { background: #fff; border: 1px solid rgba(0, 0, 0, 0.1); color: var(--text); font-size: 14px; padding: 6px 14px; box-shadow: none; border-radius: 980px; }
.qchip:hover { background: #fff; border-color: var(--accent); color: var(--accent); }

/* Results */
.res-head { margin-top: 36px; }
.res-head h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.live { border: none; border-radius: 12px; font-size: 13px; padding: 10px 14px; }
.live.ok { background: rgba(36, 138, 61, 0.08); color: #1d6b31; }
.live.bad { background: rgba(255, 159, 10, 0.1); color: #8a5300; }
.card.flush { border-radius: 18px; }
table.results-table th { background: #fff; color: var(--muted); text-transform: none; letter-spacing: -0.01em; font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--hair); padding-top: 16px; padding-bottom: 12px; }
table.results-table td { border-bottom: 1px solid var(--hair); padding-top: 22px; padding-bottom: 22px; }
table.results-table tr.best td { background: rgba(36, 138, 61, 0.04); }
table.results-table tr.best td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
table.results-table td.total { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
table.results-table tr.best td.total { color: var(--ok); }
.zname { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.zpkg { font-size: 14px; color: var(--muted); }
.badge { background: var(--ok); font-weight: 500; font-size: 11px; padding: 2px 8px; }
.znote { font-size: 12.5px; }
a.alink { color: var(--accent); border-bottom: none; }
a.alink:hover { text-decoration: underline; }
.acode { background: rgba(0, 0, 0, 0.05); color: var(--muted); border-radius: 6px; }
.proof-btn { background: transparent; color: var(--accent); border: 1px solid rgba(138, 21, 80, 0.3); font-size: 12px; padding: 3px 10px; min-height: 0; }
.proof-btn:hover, .proof-btn.on { background: var(--accent-soft); }
.proof blockquote { border-left-color: var(--accent); box-shadow: none; background: #f5f5f7; font-size: 12.5px; }
tr.proof-row td { background: #fbfbfd; }
.adet-item { background: #f5f5f7; border: none; border-radius: 12px; }
details.adet > summary { color: var(--accent); font-weight: 500; }

/* Pills / status */
.pill, .tpill { border: none; font-weight: 500; font-size: 11.5px; padding: 3px 9px; }
.pill.ok, .tpill.t-login, .tpill.t-done { background: rgba(36, 138, 61, 0.1); color: #1d6b31; }
.pill.warn, .tpill.t-feedback, .tpill.t-open { background: rgba(255, 159, 10, 0.12); color: #8a5300; }
.pill.bad, .tpill.t-login_failed { background: rgba(215, 0, 21, 0.08); color: #b0000f; }
.tpill.t-search { background: rgba(0, 113, 227, 0.08); color: #0062c4; }
.tpill.t-questionnaire { background: rgba(137, 68, 171, 0.1); color: #7a3a9a; }

/* Admin: segmented control and large page titles */
.subtabs { background: rgba(0, 0, 0, 0.05); border-radius: 10px; padding: 2px; margin: 0 auto 36px; }
.subtab { font-size: 13px; font-weight: 500; padding: 6px 18px; border-radius: 8px; color: var(--text); }
.subtab:hover { background: transparent; color: var(--text); }
.subtab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04); }
#admin { display: flex; flex-direction: column; }
#admin > .subtabs { align-self: center; }
.page-head h2, .admin-head h2 { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.page-head .hint, .admin-head .hint { font-size: 17px; max-width: 640px; }
.zone-card:hover { box-shadow: none; }
.zc-head h3 { font-size: 24px; font-weight: 600; }
.source + .source { border-top: 1px solid var(--hair); }
.pending { background: #f5f5f7; border: none; }
.formtitle { font-size: 17px; font-weight: 600; }

/* Tables (admin, reports, history) */
table.grid { font-size: 14px; }
table.grid th { background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: -0.01em; border-bottom: 1px solid var(--hair); padding: 10px 12px; }
table.grid td { border-bottom: 1px solid var(--hair); padding: 14px 12px; }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover td { background: #fbfbfd; }

/* Report tiles */
.tiles { gap: 14px; }
.tile { padding: 20px 22px; }
.tile span { font-size: 13px; color: var(--muted); }
.tile b { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.level-card { border-left: none; background: linear-gradient(180deg, #fff, #fbfbfd); }
.level-head h3 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
.fb { border: none; background: #f5f5f7; border-radius: 14px; }
.fb-reply { background: #fff; }

/* Questionnaire */
.quiz { padding: 40px; }
.quiz-head h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
.quiz-progress { height: 4px; background: rgba(0, 0, 0, 0.07); }
.quiz-progress div { background: var(--accent); }
.qstep h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; margin-top: 28px; }
.qopt { border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 16px; box-shadow: none; padding: 18px 18px; background: #fff; }
.qopt:hover { border-color: rgba(0, 0, 0, 0.25); box-shadow: none; }
.qopt.on { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 1.5px var(--accent) inset; }
.qopt b { font-size: 16px; font-weight: 600; }
.qopt span { font-size: 13px; }
.qrec { border-radius: 18px; }

/* Preview banner (preview build only) */
.preview-note { background: #fbfbfd; color: var(--muted); border-bottom: 1px solid rgba(0, 0, 0, 0.06); font-size: 12px; }

@media (max-width: 720px) {
  header.top { height: auto; padding: 10px 16px; }
  main { padding: 24px 16px 64px; }
  .card { padding: 20px; border-radius: 16px; }
  .search-hero { padding: 24px 0 16px; }
  .page-head h2, .admin-head h2 { font-size: 30px; }
  .auth-brand, .auth-form { padding: 36px 28px; }
  .auth-brand h2 { font-size: 30px; }
  .quiz { padding: 24px; }
}
header.top { padding: 0 max(22px, calc((100vw - 980px) / 2)); }
.searchbox.big input:focus, .searchbox input:focus { border-color: rgba(138, 21, 80, 0.45); box-shadow: 0 0 0 3px rgba(138, 21, 80, 0.1), 0 4px 24px rgba(0, 0, 0, 0.06); }
.quick { align-items: center; }
.banner + section, #pwBanner { margin-bottom: 20px; }
.quiz { margin-top: 8px; }
.res-head h3 { line-height: 1.15; } @media (max-width: 720px) { .res-head h3 { font-size: 24px; } }

/* Always light controls, even when the computer is in dark mode */
:root { color-scheme: light; }
input, select, textarea { color: var(--text); background-color: #fff; -webkit-text-fill-color: currentColor; }
input::placeholder, textarea::placeholder { color: #8e8e93; -webkit-text-fill-color: #8e8e93; opacity: 1; }
textarea { font-family: inherit; font-size: 15px; line-height: 1.5; width: 100%; }

/* =====================================================================
   Amana Corporate brand (#0E6686) on the Apple-style layout.
   ===================================================================== */
:root {
  --accent: #0e6686;
  --accent-dark: #0a4f68;
  --accent-soft: rgba(14, 102, 134, 0.08);
  --ring: rgba(14, 102, 134, 0.2);
}
::selection { background: rgba(14, 102, 134, 0.18); }
a, .link-btn.inline, a.alink, details.adet > summary, .banner .link-btn { color: var(--accent); }
button { background: var(--accent); }
button:hover { background: var(--accent-dark); }
button.secondary, .icon-btn, label.upload { background: rgba(0, 0, 0, 0.05); }
button.secondary:hover, .icon-btn:hover, label.upload:hover { background: rgba(0, 0, 0, 0.09); }
.icon-btn { color: var(--danger); }
.tab:hover, header .link-btn:hover { color: var(--accent); }
.qchip:hover { border-color: var(--accent); color: var(--accent); }
.qchip.on { background: var(--accent); border-color: var(--accent); }
.qopt.on { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.quiz-progress div { background: var(--accent); }
.proof-btn { color: var(--accent); border-color: rgba(14, 102, 134, 0.35); }
.proof-btn:hover, .proof-btn.on { background: var(--accent-soft); }
.proof blockquote { border-left-color: var(--accent); }
.fb-reply { border-left-color: var(--accent); }
.searchbox.big input:focus, .searchbox input:focus { border-color: rgba(14, 102, 134, 0.5); box-shadow: 0 0 0 3px rgba(14, 102, 134, 0.12), 0 4px 24px rgba(0, 0, 0, 0.06); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }

/* Header: Amana wordmark + product name */
header.top h1.brand { display: flex; align-items: center; gap: 12px; margin: 0; }
header.top h1.brand::before { content: none; display: none; }
.brand-logo { height: 22px; width: auto; display: block; }
.brand-app { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; padding-left: 12px; border-left: 1px solid rgba(0, 0, 0, 0.15); line-height: 18px; }

/* Sign in: Apple ID style, one centred column */
.auth { display: block; max-width: 440px; margin: 64px auto 32px; background: #fff; border-radius: 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); overflow: hidden; }
.auth-brand { background: none; color: var(--text); text-align: center; padding: 48px 40px 8px; }
.auth-logo { height: 46px; width: auto; display: block; margin: 0 auto 28px; }
.auth-brand h2 { color: var(--text); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.auth-brand p { color: var(--muted); font-size: 17px; margin: 8px 0 0; opacity: 1; }
.auth-brand ul, .auth-brand .logo { display: none; }
.auth-form { padding: 28px 40px 44px; }
.auth-form h2 { display: none; }
.auth-form .field { font-size: 13px; color: var(--muted); }
.auth-form input { height: 48px; font-size: 17px; }
button.big { width: 100%; border-radius: 12px; padding: 14px; font-size: 17px; font-weight: 500; }

/* Search hero */
.search-hero { padding: 56px 0 32px; }
.eyebrow { color: var(--accent); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.search-hero h2 { font-size: clamp(40px, 6.6vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; margin: 0 0 18px; }
.search-hero h2 .soft { color: #86868b; }
.lede { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 620px; margin: 0 auto 36px; line-height: 1.38; letter-spacing: -0.015em; }

/* Footer */
.site-foot { background: #f5f5f7; border-top: 1px solid rgba(0, 0, 0, 0.08); margin-top: 24px; }
.foot-inner { max-width: 980px; margin: 0 auto; padding: 28px 22px 40px; color: #6e6e73; font-size: 12px; line-height: 1.5; }
.foot-logo { height: 18px; width: auto; display: block; margin-bottom: 14px; opacity: 0.9; }
.foot-inner p { margin: 0 0 8px; max-width: 720px; }
.foot-legal { color: #86868b; }

@media (max-width: 720px) {
  .brand-logo { height: 18px; }
  .brand-app { font-size: 13px; padding-left: 10px; }
  .auth { margin: 24px auto; }
  .auth-brand { padding: 36px 24px 4px; }
  .auth-form { padding: 24px 24px 32px; }
  .search-hero { padding: 28px 0 20px; }
}
.brand-logo { height: 26px; }
#loginMsg:empty { display: none; }
.auth-form { padding-bottom: 36px; }

/* =====================================================================
   Redesign: branded hero, result cards, quiet status.
   ===================================================================== */

/* Hero: a brand-blue panel, white type, search front and centre */
.search-hero {
  position: relative; overflow: hidden;
  margin: 0 0 8px; padding: 64px 32px 44px; border-radius: 28px; text-align: center; color: #fff;
  background:
    radial-gradient(700px 320px at 15% -10%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(600px 300px at 110% 120%, rgba(64, 196, 230, 0.35), transparent 60%),
    linear-gradient(135deg, #0e6686 0%, #0b5572 45%, #083b50 100%);
  box-shadow: 0 30px 60px -30px rgba(8, 59, 80, 0.6);
}
.search-hero .eyebrow { color: rgba(255, 255, 255, 0.75); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.search-hero h2 { color: #fff; font-size: clamp(36px, 5.6vw, 62px); }
.search-hero h2 .soft { color: rgba(255, 255, 255, 0.55); }
.search-hero .lede { color: rgba(255, 255, 255, 0.82); }
.search-hero .searchbox { max-width: 680px; margin: 0 auto; }
.search-hero .searchbox svg { color: #0e6686; }
.searchbox.big input, .search-hero .searchbox input { height: 62px; border: none; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); font-size: 18px; }
.searchbox.big input:focus, .search-hero .searchbox input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 12px 40px rgba(0, 0, 0, 0.25); }
.search-hero .visa-pick { color: rgba(255, 255, 255, 0.85); margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; }
.search-hero .visa-pick select { background: rgba(255, 255, 255, 0.16); color: #fff; -webkit-text-fill-color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 980px; padding: 6px 30px 6px 14px; }
.search-hero .visa-pick select option { color: #1d1d1f; }
.search-hero #examples { margin-top: 18px; color: rgba(255, 255, 255, 0.75); }
.search-hero .qchip { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; }
.search-hero .qchip:hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.5); color: #fff; }

/* Results heading + status */
.res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 40px 0 6px; }
.res-head h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.res-head.second { margin-top: 56px; }
.res-head.second h3 { font-size: 22px; }
.statusline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #6e6e73; margin: 4px 0 18px; }
.statusline > span { display: inline-flex; align-items: center; gap: 6px; }
.statusline .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: #30b158; } .dot.warn { background: #ff9f0a; } .dot.idle { background: #c7c7cc; }

/* Result cards */
.zcards { display: grid; gap: 14px; }
.zc { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 210px; background: #fff; border-radius: 20px; overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; }
.zc:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.zc.is-best { box-shadow: 0 0 0 2px #30b158 inset; }
.zc-body { padding: 24px 26px 20px; min-width: 0; }
.zc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zc-top h4 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.zc-badge { font-size: 12px; font-weight: 600; color: #fff; background: #30b158; border-radius: 980px; padding: 3px 10px; }
.zc-badge.warn { background: #ff9f0a; }
.zc-pkg { color: #424245; font-size: 16px; margin-top: 2px; }
.zc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.tag { font-size: 12.5px; color: #1d1d1f; background: #f5f5f7; border-radius: 8px; padding: 4px 9px; }
.tag.warn { color: #8a5300; background: rgba(255, 159, 10, 0.12); }
.zc-break { font-size: 13px; color: #6e6e73; margin-top: 8px; }
.zc-act { margin-top: 12px; font-size: 14px; }
.zc-label { font-size: 12px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }
.zc-note { margin: 10px 0 0; font-size: 13px; color: #6e6e73; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zc-note:hover { -webkit-line-clamp: unset; }
.zc-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 12px; }
.zc-actions details.adet { margin: 0; flex-basis: 100%; }
.zc-actions details.adet:not([open]) { flex-basis: auto; }
.zc-link { background: none; color: var(--accent); padding: 0; font-size: 13px; font-weight: 500; border-radius: 0; }
.zc-link:hover { background: none; text-decoration: underline; }
.zc-src { margin-top: 10px; font-size: 12px; color: #86868b; }
.zc-price { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; padding: 24px 26px; background: #fbfbfd; border-left: 1px solid rgba(0, 0, 0, 0.05); text-align: right; }
.zc.is-best .zc-price { background: rgba(48, 177, 88, 0.06); }
.zc-cur { font-size: 13px; color: #6e6e73; font-weight: 500; }
.zc-amt { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: #1d1d1f; }
.zc.is-best .zc-amt { color: #248a3d; }
.zc-sub { font-size: 12px; color: #86868b; margin-bottom: 10px; }
.zc .proof-btn { margin: 0; font-size: 12.5px; padding: 6px 14px; border-radius: 980px; background: #fff; }
.zc-drawer { grid-column: 1 / -1; padding: 18px 26px 22px; background: #fbfbfd; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.zc-drawer .more-pkg { display: flex; justify-content: space-between; padding: 8px 0 4px; font-size: 14px; }

/* Quiet banners */
#pwBanner { background: rgba(14, 102, 134, 0.07); color: #0a4f68; border-radius: 14px; }
.empty-state.small { background: #fff; border-radius: 20px; padding: 36px 24px; margin-top: 28px; }

@media (max-width: 720px) {
  .search-hero { padding: 40px 18px 28px; border-radius: 22px; }
  .zc { grid-template-columns: 1fr; }
  .zc-price { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; border-left: none; border-top: 1px solid rgba(0, 0, 0, 0.05); padding: 16px 22px; flex-wrap: wrap; }
  .zc-price .proof-btn { margin-left: auto; }
  .zc-sub { margin: 0; }
  .zc-body { padding: 20px 22px 16px; }
}
.search-hero .searchbox, .search-hero .searchbox.big { border: none; background: none; box-shadow: none; padding: 0; position: relative; }
.search-hero #examples, .search-hero #examples * { color: inherit; }
.search-hero #examples { color: rgba(255, 255, 255, 0.75); }
.search-hero #examples .qchip { color: #fff; }
.zc-drawer .more-pkg { width: 100%; border-top: 1px solid rgba(0, 0, 0, 0.06); padding-top: 12px; }
.zc-drawer .more-pkg:first-child { border-top: none; padding-top: 0; }

/* Activity log */
.log-day { font-size: 13px; font-weight: 600; color: #6e6e73; padding: 18px 0 6px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); position: sticky; top: 52px; background: #fff; z-index: 1; }
.log-day:first-child { padding-top: 0; }
.log-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 110px; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); font-size: 14px; }
.log-time { color: #6e6e73; font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 1px; }
.log-ip { color: #a1a1a6; font-size: 12px; text-align: right; }
.log-target { font-weight: 500; }
.log-detail { color: #6e6e73; font-size: 13px; margin-top: 3px; }
.log-changes { margin: 6px 0 0; padding: 0 0 0 18px; color: #424245; font-size: 13px; }
.log-changes li { margin: 2px 0; }
.log-row.t-login_failed { background: rgba(215, 0, 21, 0.03); }
.tpill.t-prices_changed, .tpill.t-price_file_read, .tpill.t-price_link_changed { background: rgba(14, 102, 134, 0.1); color: #0a4f68; }
.tpill.t-user_added, .tpill.t-user_updated, .tpill.t-user_removed, .tpill.t-password_reset, .tpill.t-password_changed { background: rgba(137, 68, 171, 0.1); color: #7a3a9a; }
.row.center { justify-content: center; margin-top: 12px; }
@media (max-width: 720px) { .log-row { grid-template-columns: 64px minmax(0, 1fr); } .log-ip { display: none; } }
.hist-all { font-size: 13px; color: #6e6e73; margin: -4px 0 10px; }

/* Activity log: one compact toolbar */
.log-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.log-bar select, .log-bar input[type="search"] { width: auto; flex: 0 1 auto; border-radius: 980px; padding: 9px 16px; font-size: 14px; background: #fff; }
.log-bar select { padding-right: 34px; }
.log-bar input[type="search"] { flex: 1 1 200px; min-width: 160px; }
.log-dates { display: inline-flex; align-items: center; gap: 6px; color: #6e6e73; }
.log-dates input { width: auto; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.log-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: #6e6e73; margin: 0 0 14px 4px; }
.log-summary b { color: #1d1d1f; font-weight: 600; }
.log-summary .warn b, .log-summary .warn { color: #d70015; }
.log-empty { text-align: center; padding: 28px 10px 18px; }
.log-empty h3 { margin: 0 0 6px; font-size: 19px; }
.log-empty p { color: #6e6e73; margin: 0 0 14px; }
.log-empty .row { gap: 8px; }
#logXlsxBtn { align-self: center; }
.a-preview .pending { position: relative; }
.panel-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.06); color: #1d1d1f; font-size: 13px; line-height: 30px; text-align: center; }
.panel-close:hover { background: rgba(0, 0, 0, 0.12); }
button.secondary.on { background: rgba(14, 102, 134, 0.12); color: #0a4f68; }
.a-preview .pending { padding-top: 16px; padding-right: 52px; } .a-preview .a-filter { margin-top: 10px; }
.qpkg { font-size: 16px; color: #424245; margin: 2px 0 4px; }
.qwhy { margin-top: 12px; padding: 10px 14px; background: rgba(255, 255, 255, 0.7); border-radius: 10px; font-size: 13.5px; color: #1d1d1f; }

/* Questionnaire: exact activity check and approvals */
.qcheck { margin: 10px 0 6px; padding: 14px 16px; border-radius: 12px; font-size: 14px; background: #f5f5f7; }
.qcheck.valid { background: rgba(48, 177, 88, 0.07); }
.qcheck.invalid { background: rgba(215, 0, 21, 0.05); }
.qcheck-head { font-weight: 600; margin-bottom: 6px; }
.qcheck.valid .qcheck-head { color: #1d6b31; }
.qcheck.invalid .qcheck-head { color: #b0000f; }
.qcheck-zones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qcheck .quick { margin-top: 8px; justify-content: flex-start; }
.qwarn { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 159, 10, 0.1); color: #6b4100; font-size: 13.5px; line-height: 1.45; }
.qwarn ul { margin: 6px 0 0; padding-left: 18px; }
.qwarn li { margin: 3px 0; }
.qok { margin-top: 8px; color: #1d6b31; font-size: 13.5px; }

/* =====================================================================
   apple.com system: type scale, 44px global nav, edge-to-edge hero
   tiles, ribbons, pill buttons, form fields and footer.
   Brand colour (#0E6686) and Amana logo unchanged.
   ===================================================================== */
:root {
  font-family: "SF Pro Text", "SF Pro Icons", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --apple-text: #1d1d1f;
  --apple-gray: #6e6e73;
  --apple-line: #d2d2d7;
  --apple-tile: #f5f5f7;
}
html { overflow-x: hidden; }
body { font-size: 17px; line-height: 1.47059; font-weight: 400; letter-spacing: -0.022em; color: var(--apple-text); background: #fff; }
h1, h2, h3, h4, .search-hero h2, .page-head h2, .admin-head h2, .res-head h3, .zc-top h4, .zname, .quiz-head h2, .level-head h3, .auth-brand h2 {
  font-family: "SF Pro Display", "SF Pro Icons", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
}

/* Global nav: 44px, translucent, 12px links */
header.top { height: 44px; padding: 0 max(22px, calc((100vw - 1024px) / 2 + 22px)); background: rgba(250, 250, 252, 0.8); border-bottom: none; box-shadow: none; }
.brand-logo { height: 20px; }
.brand-app { font-size: 14px; font-weight: 400; line-height: 16px; padding-left: 10px; }
.tab, header .link-btn { font-size: 12px; font-weight: 400; letter-spacing: -0.01em; color: rgba(0, 0, 0, 0.8); padding: 0 10px; height: 44px; border-radius: 0; }
.tab.active { font-weight: 400; color: #000; }
.tab:hover, header .link-btn:hover { color: #000; background: none; }

/* Layout: views sit on white; tiles use the Apple light grey */
main { max-width: none; padding: 0 0 80px; }
.view, #loginView { max-width: 1024px; margin: 0 auto; padding: 48px 22px 0; box-sizing: border-box; }
#home { padding-top: 0; max-width: none; padding-left: 0; padding-right: 0; }
#home #results { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.card, .zc, .tile, .quiz, .level-card { background: var(--apple-tile); }
.zc-price { background: transparent; border-left: 1px solid rgba(0, 0, 0, 0.06); }
.zc-drawer, tr.proof-row td { background: #fff; }
.zc:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); transform: none; }

/* Ribbon (temporary-password notice) */
#pwBanner { max-width: none; margin: 0; border-radius: 0; text-align: center; font-size: 14px; padding: 12px 22px; background: var(--apple-tile); color: var(--apple-text); }
#pwBanner .link-btn { font-size: 14px; }

/* Hero tile: edge to edge, Apple type scale, brand colour kept */
.search-hero { border-radius: 0; margin: 0 0 12px; padding: 84px 22px 64px; box-shadow: none; }
.search-hero .eyebrow { font-size: 21px; font-weight: 600; letter-spacing: 0.011em; text-transform: none; color: rgba(255, 255, 255, 0.85); }
.search-hero h2 { font-size: 56px; line-height: 1.07143; letter-spacing: -0.005em; margin: 6px 0 12px; }
.lede { font-size: 28px; line-height: 1.14286; letter-spacing: 0.007em; max-width: 760px; margin: 0 auto 40px; }
.search-hero .searchbox input { height: 56px; border-radius: 12px; font-size: 17px; box-shadow: none; }
.search-hero .searchbox input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4); }
.search-hero .visa-pick, .search-hero #examples { font-size: 14px; }

/* Headlines inside pages */
.page-head h2, .admin-head h2 { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
.page-head .hint, .admin-head .hint { font-size: 21px; line-height: 1.381; letter-spacing: 0.011em; color: var(--apple-gray); }
.res-head h3 { font-size: 32px; line-height: 1.125; letter-spacing: 0.004em; }
.card h2 { font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
.quiz-head h2 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
.qstep h3 { font-size: 24px; line-height: 1.16667; letter-spacing: 0.009em; }
.tile b { font-size: 40px; font-weight: 600; }

/* Buttons: Apple pills (brand colour) */
button { font-size: 17px; line-height: 1.17648; letter-spacing: -0.022em; padding: 11px 21px; border-radius: 980px; font-weight: 400; }
button.small, label.upload, .proof-btn { font-size: 14px; padding: 8px 16px; line-height: 1.28577; border-radius: 980px; }
button.secondary, label.upload { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.secondary:hover, label.upload:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
button.secondary.on { background: var(--accent); color: #fff; }
.icon-btn { background: transparent; border: 1px solid rgba(215, 0, 21, 0.4); }
.link-btn.inline, .zc-link, details.adet > summary { font-size: 14px; }
.zc-link::after, .link-btn.inline::after { content: " ›"; }

/* Form fields: Apple style */
input[type="text"], input[type="number"], input[type="password"], input[type="search"], input[type="url"], input[type="date"], select, textarea {
  border: 1px solid var(--apple-line); border-radius: 12px; font-size: 17px; padding: 14px 16px; background: #fff; letter-spacing: -0.022em;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(14, 102, 134, 0.18); }
.field, .field.small { font-size: 12px; color: var(--apple-gray); }
.log-bar select, .log-bar input[type="search"] { font-size: 14px; padding: 9px 16px; }

/* Segmented control */
.subtabs { background: rgba(118, 118, 128, 0.12); border-radius: 9px; padding: 2px; margin-bottom: 40px; }
.subtab { font-size: 13px; padding: 6px 16px; border-radius: 7px; }

/* Sign-in */
.auth { background: #fff; box-shadow: none; border: 1px solid var(--apple-line); border-radius: 18px; }
.auth-brand h2 { font-size: 40px; letter-spacing: 0; }
.auth-brand p { font-size: 21px; }

/* Footer: apple.com style */
.site-foot { background: var(--apple-tile); border-top: none; margin-top: 0; }
.foot-inner { max-width: 980px; padding: 17px 22px 21px; font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; color: var(--apple-gray); }
.foot-inner p { border-bottom: 1px solid var(--apple-line); padding: 0 0 10px; margin: 0 0 10px; }
.foot-inner .foot-legal { border-bottom: none; color: #86868b; }
.foot-logo { height: 16px; margin: 4px 0 12px; }

@media (max-width: 734px) {
  header.top { height: auto; padding: 8px 16px; }
  .tab, header .link-btn { height: 36px; }
  .search-hero { padding: 56px 18px 44px; }
  .search-hero h2 { font-size: 40px; line-height: 1.1; }
  .lede { font-size: 21px; line-height: 1.19048; }
  .page-head h2, .admin-head h2 { font-size: 32px; }
  .page-head .hint, .admin-head .hint { font-size: 17px; }
  .quiz-head h2 { font-size: 28px; }
  .view, #loginView { padding: 32px 16px 0; }
}
#loginView.auth { max-width: 440px; margin: 64px auto 80px; padding: 0; }
@media (max-width: 734px) { #loginView.auth { margin: 24px 16px 48px; } }

/* Compact hero once a search is typed, so results sit near the top */
.search-hero .eyebrow, .search-hero h2, .search-hero .lede { transition: opacity 0.2s, max-height 0.25s, margin 0.25s; max-height: 260px; overflow: hidden; }
#home.searching .search-hero { padding-top: 36px; padding-bottom: 28px; }
#home.searching .search-hero .eyebrow, #home.searching .search-hero h2, #home.searching .search-hero .lede { opacity: 0; max-height: 0; margin: 0; }
/* Native search clear / datalist arrow look out of place */
#q::-webkit-calendar-picker-indicator, #qExact::-webkit-calendar-picker-indicator { display: none !important; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; height: 16px; width: 16px; cursor: pointer; opacity: 0.5;
  background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%2386868b'/%3E%3Cpath d='M8 8l8 8M16 8l-8 8' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
#q::-webkit-search-cancel-button:hover { opacity: 0.8; }
/* Overview before searching */
.overview { max-width: 980px; margin: 48px auto 72px; padding: 0 22px; }
.overview .tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.overview .tile { border-radius: 18px; padding: 24px 22px; display: flex; flex-direction: column; gap: 6px; }
.overview .tile b { font-size: 32px; color: var(--accent); }
.overview p { font-size: 15px; margin-top: 20px; }
/* Footer aligned with the header width */
.foot-inner { margin: 0 auto; }
/* Visible keyboard focus for every control */
button:focus-visible, a:focus-visible, .qopt:focus-visible, .qchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Phones: wrap the nav so every item (incl. Log out) is visible */
@media (max-width: 734px) {
  header.top nav { flex-wrap: wrap; justify-content: center; overflow: visible; row-gap: 2px; }
  header.top nav .tab, header.top nav .link-btn { padding: 0 10px; }
}
.qstep h3 .qmulti { font-size: 14px; font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.qall { margin-top: 28px; }
.qall > summary { cursor: pointer; list-style: none; }
.qall > summary::-webkit-details-marker { display: none; }
.qall > summary h3 { display: inline; margin-right: 10px; }
.qall > summary h3::before { content: "▾ "; color: var(--accent); }
.qall:not([open]) > summary h3::before { content: "▸ "; }
.qalt-item.dim { opacity: 0.85; }
.qwhynot { font-size: 13px; color: #9a5b00; background: #fff4e0; border-radius: 8px; padding: 4px 10px; display: inline-block; margin-bottom: 8px; }
.qwhynot { width: fit-content; }

/* Client companies: list of cards, Add company at the top */
.co-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.co-head-row #coAddBtn { flex: none; }
.co-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.co-form .field input { width: 100%; margin-top: 4px; }
#coManagers { margin: 8px 0 16px; }
.co-tools { margin: 8px 0 4px; gap: 12px; }
.co-tools input { flex: 1; }
.co-list { display: grid; gap: 16px; margin-bottom: 40px; }
.co-card { background: var(--apple-tile); border-radius: 18px; padding: 22px 24px; transition: box-shadow 0.4s; }
.co-card.flash { box-shadow: 0 0 0 3px var(--accent); }
.co-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.co-top h3 { font-size: 22px; margin: 0 0 2px; }
.co-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.co-box { background: #fff; border-radius: 14px; padding: 16px 18px; }
.co-box h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--apple-gray); margin: 0 0 10px; }
.co-box a { color: var(--accent); }
.co-users { list-style: none; margin: 0 0 10px; padding: 0; }
.co-users li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--apple-line); }
.co-users li:last-child { border-bottom: none; }
.co-users .unassign { color: #b42318; font-size: 13px; }
.co-users .unassign::after { content: none; }
.co-assign { gap: 8px; margin: 6px 0 8px; }
.co-assign select { font-size: 14px; padding: 8px 12px; flex: 1; }
@media (max-width: 734px) { .co-grid { grid-template-columns: 1fr; } }

/* Date fields: calendar icon always visible, whole field opens the calendar */
input[type="date"] { min-width: 170px; cursor: pointer; padding-right: 12px; }
input[type="date"]::-webkit-calendar-picker-indicator { display: block; opacity: 0.75; cursor: pointer; margin-left: 6px; }
.period-chips { margin-bottom: 14px; }
.period-chips .qchip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
#coManagerPick { width: 100%; margin-top: 4px; }
.mgr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mgr-tags:empty { display: none; }
.mgr-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: #fff; border-radius: 980px; padding: 4px 4px 4px 12px; font-size: 14px; }
.mgr-tag button { background: transparent; color: #fff; border: none; padding: 0 8px; font-size: 16px; line-height: 1; cursor: pointer; }
.mgr-tag button:hover { background: rgba(255,255,255,0.2); }

/* Date-range calendar */
.date-field { cursor: pointer; min-width: 150px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6686' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; padding-right: 42px !important; }
.range-pop { position: absolute; z-index: 1000; background: #fff; border: 1px solid var(--apple-line); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.16); padding: 14px; color: #1d1d1f; }
.rp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.rp-head b { flex: 1; text-align: center; font-size: 15px; }
.rp-head button { background: transparent; color: var(--accent); border: none; padding: 4px 10px; font-size: 18px; border-radius: 8px; }
.rp-head button:hover { background: rgba(14,102,134,0.08); }
.rp-week, .rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.rp-week span { font-size: 11px; color: var(--apple-gray); padding: 4px 0; }
.rp-grid button { background: transparent; color: #1d1d1f; border: none; padding: 0; height: 36px; font-size: 14px; border-radius: 8px; }
.rp-grid button:hover:not(:disabled) { background: rgba(14,102,134,0.1); }
.rp-grid button.in { background: rgba(14,102,134,0.12); border-radius: 0; }
.rp-grid button.start, .rp-grid button.end { background: var(--accent); color: #fff; }
.rp-grid button.today { font-weight: 700; text-decoration: underline; }
.rp-grid button:disabled { color: #c7c7cc; cursor: default; }
.rp-sel { display: flex; gap: 8px; margin-top: 10px; }
.rp-sel span { flex: 1; font-size: 12px; color: var(--apple-gray); border: 1px solid var(--apple-line); border-radius: 10px; padding: 6px 10px; }
.rp-sel span b { display: block; font-size: 14px; color: #1d1d1f; }
.rp-sel span.now { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(14,102,134,0.15); }
.rp-hint { font-size: 12px; color: var(--apple-gray); margin: 8px 0; }
.rp-foot { display: flex; justify-content: flex-end; gap: 8px; }
input[type="text"].date-field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6686' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }

/* ===== apple.com fidelity layer (styling only; same content, Amana blue kept) ===== */
body { color: #1d1d1f; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
/* Global nav: frosted bar, 12px links, like apple.com */
header.top { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); background: rgba(251, 251, 253, 0.8); }
.tab, header .link-btn { color: rgba(0, 0, 0, 0.8); transition: color 0.2s; }
.tab:hover, header .link-btn:hover { color: #000; background: transparent; }
.tab.active { color: #000; font-weight: 400; box-shadow: none; }
/* Section headlines centred like apple.com product sections; actions sit below */
.page-head, .admin-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; margin: 8px auto 40px; max-width: 980px; }
.page-head > div, .admin-head > div { display: flex; flex-direction: column; align-items: center; }
.page-head h2, .admin-head h2 { font-size: 56px; line-height: 1.07143; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 6px; }
.page-head .hint, .admin-head .hint { font-size: 24px; line-height: 1.16667; font-weight: 400; letter-spacing: 0.009em; color: #1d1d1f; max-width: 760px; margin: 0; }
.co-head-row { align-items: center; justify-content: center; }
.admin-head form.row { justify-content: center; max-width: 560px; width: 100%; }
.admin-head form.row input { flex: 1; }
/* Cards and tiles: apple grey tiles, no borders or shadows */
.card, .co-card, .tile, .quiz, .level-card, .filters-card { background: #f5f5f7; border: none; box-shadow: none; border-radius: 18px; }
.co-box { border-radius: 12px; }
h3 { font-weight: 600; letter-spacing: 0.009em; }
.card h2, .card > h3 { font-weight: 600; }
/* Tables: quiet, apple spec-sheet style */
table.grid { font-size: 14px; }
table.grid th { font-size: 12px; font-weight: 600; color: #6e6e73; text-transform: none; letter-spacing: -0.01em; background: transparent; border-bottom: 1px solid #d2d2d7; }
table.grid td { border-bottom: 1px solid #e8e8ed; }
table.grid tbody tr:hover { background: rgba(0, 0, 0, 0.02); }
/* Text links: apple "Learn more ›" style in Amana blue */
a, .link-btn { color: var(--accent); }
a:hover, .link-btn:hover { text-decoration: underline; }
.muted, .hint { color: #6e6e73; }
/* Pills: apple sizes */
.qchip { border-color: #d2d2d7; color: #1d1d1f; }
.qchip:hover { border-color: #86868b; }
.qchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Segmented control */
.subtabs { background: rgba(118, 118, 128, 0.12); }
.subtab.active { box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); }
@media (max-width: 734px) {
  .page-head h2, .admin-head h2 { font-size: 32px; line-height: 1.125; }
  .page-head .hint, .admin-head .hint { font-size: 19px; line-height: 1.21; }
}
.admin-head form.row { flex: none; align-items: center; }
.page-head > button, .admin-head > button { align-self: center; }

/* Phones: nothing wider than the screen */
.grid-2 > *, .card, .co-card, .zc { min-width: 0; }
.muted, .zone-meta, .small-text { overflow-wrap: anywhere; }
@media (max-width: 734px) {
  .grid-2 { grid-template-columns: 1fr !important; }
  .subtabs { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; }
  .subtab { padding: 6px 12px; }
  .card { padding-left: 16px; padding-right: 16px; }
  .table-scroll { max-width: 100%; overflow-x: auto; }
}

/* ===== Questionnaire (main page) ===== */
.qform { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin: 8px 0 18px; }
.qform .field input { width: 100%; margin-top: 4px; }
#quiz h4 { font-size: 17px; font-weight: 600; margin: 20px 0 10px; letter-spacing: -0.01em; }
#quiz .qsec { margin-top: 34px; }
#quiz textarea, #quiz #qOtherCat, #quiz #qVisaExpiry, #quiz #qCorporate { width: 100%; margin-top: 6px; }
.qgrid.yn { grid-template-columns: repeat(2, minmax(0, 160px)); }
.qgrid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.qgrid.eleven { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.qgrid.yn .qopt, .qgrid.five .qopt, .qgrid.eleven .qopt { text-align: center; padding: 14px 8px; }
.qacts { display: grid; gap: 10px; margin-top: 8px; }
.qact-line { display: flex; gap: 10px; align-items: flex-start; }
.qact-n { width: 22px; padding-top: 15px; color: var(--apple-gray); font-weight: 600; }
.qact-field { position: relative; flex: 1; }
.qact-field input { width: 100%; }
.qact.ok { border-color: #34c759; background: #f3fbf5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334c759' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
.qsugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--apple-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 6px; max-height: 320px; overflow: auto; }
.qsugg-box { display: grid; gap: 4px; margin-top: 8px; }
.qsugg-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: transparent; color: #1d1d1f; border: none; border-radius: 8px; padding: 8px 10px; font-size: 15px; }
.qsugg-box .qsugg-item { background: #fff; border: 1px solid var(--apple-line); }
.qsugg-item:hover { background: rgba(14,102,134,0.08); }
.qsugg-item .muted { white-space: nowrap; }
.quiz-nav { align-items: center; gap: 12px; }
#quizMsg:empty { display: none; }
/* Comparison table (the agreed format) */
.qresult-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.qresult-head .row { gap: 8px; flex-wrap: wrap; }
table.cmp { font-size: 15px; min-width: 520px; }
table.cmp th:first-child { text-align: left; white-space: nowrap; color: #1d1d1f; font-weight: 500; }
table.cmp thead th { vertical-align: bottom; }
.cmp-zone { font-size: 15px; font-weight: 700; color: #1d1d1f; }
.cmp-pkg { font-size: 12px; font-weight: 400; color: var(--apple-gray); white-space: normal; max-width: 180px; margin-left: auto; }
table.cmp td.num, table.cmp th.num { text-align: right; }
table.cmp .best { background: rgba(14,102,134,0.06); }
table.cmp tr.cmp-total th, table.cmp tr.cmp-total td { border-top: 2px solid #1d1d1f; font-size: 17px; }
table.cmp tr.cmp-sub th, table.cmp tr.cmp-sub td { font-size: 13px; color: var(--apple-gray); }
.cmp-detail { background: #fff; border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.cmp-detail summary { cursor: pointer; }
@media (max-width: 734px) {
  .qgrid.eleven { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .qgrid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print {
  header.top, .subtabs, .quiz-nav, .qresult-head .row, .site-foot, #pwBanner, .preview-note { display: none !important; }
  .card.quiz { box-shadow: none; background: #fff; }
  .cmp-detail { break-inside: avoid; }
}
dl.qsummary { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; background: #fff; border-radius: 14px; padding: 18px 20px; margin: 8px 0 22px; font-size: 15px; }
dl.qsummary dt { color: var(--apple-gray); margin: 0; }
dl.qsummary dd { margin: 0; }
@media (max-width: 734px) { dl.qsummary { grid-template-columns: 1fr; } dl.qsummary dt { margin-top: 6px; } }
ul.qreq { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
ul.qreq li { margin: 4px 0; }
#qApprovals .qcheck, #qOfficeHint .qcheck { margin-bottom: 16px; }
#qExactKw { width: 100%; margin-top: 8px; }
.qexact-list { display: grid; gap: 8px; margin-top: 10px; max-height: 460px; overflow: auto; }
.qexact-row { display: block; width: 100%; text-align: left; background: #fff; color: #1d1d1f; border: 1px solid var(--apple-line); border-radius: 12px; padding: 10px 14px; }
.qexact-row:hover { border-color: var(--accent); background: #fff; }
.qexact-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.qexact-zones { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12px; color: #424245; }
.tag.nat-manufacture { background: #fdf0e1; color: #9a5b00; }
.tag.nat-service { background: #e8f1fb; color: #0b5cad; }
.tag.nat-commercial { background: #e9f7ee; color: #1d7a3a; }
.qexact-card { margin-top: 24px; background: #fff; }
.qgrid.eight { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.qgrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qgrid.eight .qopt { text-align: center; padding: 14px 6px; }
.qconsent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 15px; }
.qconsent input { width: 18px; height: 18px; margin-top: 2px; }
@media (max-width: 734px) { .qgrid.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); } .qgrid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qpicked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 14px; }
.qpick { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--accent); border-radius: 980px; padding: 4px 4px 4px 12px; font-size: 14px; }
.qpick button { background: transparent; color: var(--accent); border: none; padding: 0 8px; font-size: 16px; }
.qexact-add { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 14px; }
.qfees { font-size: 13px; background: #fff7e6; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
#qSector { margin: 6px 0 10px; }
#qSector .qchip .muted { font-size: 11px; }
.qlock { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: rgba(14,102,134,0.06); border: 1px solid var(--accent); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; }
.qlock > div:first-child { flex: 1; }
.qlock-price { font-size: 26px; font-weight: 700; text-align: right; }
.qclar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.qclar input { width: 100%; margin-top: 4px; }
.qclar-file { margin: 6px 0; font-size: 14px; }
.qmatchonly { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0; }
.qexact-row .qexact-add { margin-left: auto; color: #fff; }
.qreq-line { color: #6b4a00; margin-top: 4px; }
table.qpicked-t { font-size: 14px; margin-bottom: 14px; }
.otp-steps { padding-left: 20px; font-size: 15px; }
.otp-steps li { margin: 10px 0; }
.otp-qr svg { display: block; margin: 8px 0; width: 180px; height: 180px; }
#loginCaptcha:not(:empty) { margin: 6px 0 12px; }
.cmp-wrap { background: #fff; border-radius: 16px; padding: 16px 18px; margin: 10px 0 22px; }
table.cmp .cmp-in { width: 110px; text-align: right; padding: 6px 8px; font-size: 15px; border: 1px solid transparent; background: transparent; border-radius: 8px; }
table.cmp .cmp-in:hover, table.cmp .cmp-in:focus { border-color: var(--apple-line); background: #fff; }
table.cmp td.cmp-missing { background: #fdecea; }
table.cmp td.cmp-missing .cmp-in::placeholder { color: #b42318; }
table.cmp td.cmp-edited { background: #fff6d6; }
.cmp-legend { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; }
.cmp-legend.miss { background: #fdecea; color: #b42318; }
.cmp-legend.ed { background: #fff6d6; color: #8a6100; }
.cmp-choose { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
table.cmp td.num { white-space: nowrap; }

/* Admin → Activity sorting */
.cls-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 4px; }
.cls-stat { background: var(--card, #fff); border: 1px solid var(--line, #e5e5ea); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cls-stat b { font-size: 1.5rem; }
.cls-stat span { color: var(--muted, #6e6e73); font-size: .85rem; }
.cls-last { grid-column: 1 / -1; margin: 0; }
.cls-t select { min-width: 0; max-width: 190px; padding: 4px 6px; font-size: .85rem; }
.tag.ai-tag { background: #eef4ff; color: #0b5cd5; border-color: #cfe0ff; }

/* Activity waterfall: kind -> sector -> file category -> activity */
.qhow { margin: 6px 0 12px; border: 1px solid var(--apple-line); border-radius: 12px; padding: 10px 14px; background: #fbfbfd; }
.qhow summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.qhow ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: #424245; }
.wf-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin: 6px 0 10px; }
.wf-sep { color: #86868b; }
.wf-tools { display: grid; gap: 6px; }
.wf-step { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; margin: 16px 0 10px; }
.wf-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.wf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; max-height: 520px; overflow: auto; }
.wf-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #fff; color: #1d1d1f; border: 1px solid var(--apple-line); border-radius: 14px; padding: 14px 16px; font-weight: 400; }
.wf-tile:hover { border-color: var(--accent); background: #f5f9ff; color: #1d1d1f; }
.wf-t { font-weight: 600; font-size: 15px; }
.wf-s { font-size: 13px; color: #6e6e73; }
.wf-n { font-size: 12px; color: var(--accent); margin-top: auto; }
#qWf .qexact-row { margin-bottom: 8px; }
#qWf .qexact-row summary { cursor: pointer; list-style: none; }
#qWf .qexact-row summary::-webkit-details-marker { display: none; }
#qWf .qexact-row summary::before { content: '›'; color: #86868b; transition: transform .15s; display: inline-block; }
#qWf .qexact-row[open] summary::before { transform: rotate(90deg); }
.tag.wf-appr { background: #fff4e5; color: #9a5b00; border-color: #ffe0b2; }
.wf-detail { margin: 10px 0 2px; display: grid; gap: 8px; font-size: 13px; }
.wf-detail > div { display: grid; grid-template-columns: 210px 1fr; gap: 10px; }
.wf-detail dt { color: #6e6e73; }
.wf-detail dd { margin: 0; color: #1d1d1f; }
@media (max-width: 640px) { .wf-detail > div { grid-template-columns: 1fr; gap: 2px; } .wf-tiles { grid-template-columns: 1fr 1fr; } }

/* Questionnaire options as dropdowns */
.qselect { width: 100%; max-width: 560px; display: block; margin: 6px 0 14px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--apple-line); border-radius: 12px; background: #fff; color: #1d1d1f; }
.qselect[multiple] { min-height: 150px; padding: 6px; }
.wf-tile.on { border-color: var(--accent); background: #eef5ff; box-shadow: 0 0 0 1px var(--accent) inset; }
.qexact-row.wf-open .wf-detail { border-top: 1px solid var(--apple-line); padding-top: 10px; }

/* Price comparison: one package per card, scrolling down */
.cmp-cards { display: grid; gap: 14px; margin: 10px 0; }
.cmp-card { background: #fff; border: 1px solid var(--apple-line); border-radius: 16px; padding: 16px 18px; }
.cmp-card.best { border-color: #1a7f37; box-shadow: 0 0 0 1px #1a7f37 inset; }
.cmp-card.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.cmp-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cmp-rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; }
.cmp-card-total { margin-left: auto; text-align: right; font-size: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cmp-low { background: #e6f4ea; color: #1a7f37; border-color: #b7e1c1; font-size: 11px; }
.cmp-mini { width: 100%; margin: 4px 0 10px; }
.cmp-mini th { text-align: left; font-weight: 400; color: #6e6e73; width: 50%; }
.hist-det { min-width: 240px; line-height: 1.45; }
.hist-zone { white-space: nowrap; }
.hist-layout { grid-template-columns: 1fr !important; }
.hist-zone { white-space: normal; }
.tag.rel-tag { background: #f3eefe; color: #6b3fb5; border-color: #e0d4fa; }

/* Final quote */
#qFinal { margin-top: 18px; }
.final-quote { background: #fff; border: 2px solid var(--accent); border-radius: 16px; padding: 18px 20px; }
.fq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fq-total { margin-left: auto; font-size: 24px; font-weight: 700; }
.final-quote h4 { margin: 14px 0 6px; }
.fq-actions { margin-top: 12px; gap: 8px; flex-wrap: wrap; }
@media print {
  body.print-quote * { visibility: hidden; }
  body.print-quote #finalQuote, body.print-quote #finalQuote * { visibility: visible; }
  body.print-quote #finalQuote { position: absolute; left: 0; top: 0; width: 100%; border: none; }
}

/* =====================================================================
   Premium layer — design only (typography, spacing, surfaces, motion).
   ===================================================================== */
:root {
  --ink: #0b1b2b;
  --ink-2: #33475b;
  --muted: #6b7a8c;
  --line: #e6ebf1;
  --line-2: #d6dee7;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --accent: #0e6686;
  --accent-dark: #0a4f68;
  --accent-2: #13a3c4;
  --accent-soft: rgba(14, 102, 134, 0.07);
  --ring: rgba(19, 163, 196, 0.22);
  --radius: 18px;
  --shadow-1: 0 1px 2px rgba(11, 27, 43, 0.04), 0 1px 1px rgba(11, 27, 43, 0.02);
  --shadow-2: 0 1px 2px rgba(11, 27, 43, 0.04), 0 8px 24px -6px rgba(11, 27, 43, 0.08);
  --shadow-3: 0 2px 4px rgba(11, 27, 43, 0.04), 0 24px 48px -12px rgba(11, 27, 43, 0.16);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}
html body {
  font-family: var(--font); color: var(--ink); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "ss03";
  background:
    radial-gradient(1200px 520px at 85% -120px, rgba(19, 163, 196, 0.10), transparent 60%),
    radial-gradient(900px 480px at -10% -80px, rgba(14, 102, 134, 0.08), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
}
html body h1, html body h2, html body h3, html body h4 { font-family: var(--display); color: var(--ink); letter-spacing: -0.02em; }
html body h2 { font-weight: 700; }
html body h3 { font-weight: 700; font-size: 18px; }
html body h4 { font-weight: 600; font-size: 15px; }
html body .muted, html body .hint { color: var(--muted); }
html body .small-text { font-size: 13px; }

/* Header: frosted glass bar */
html body header.top {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(11, 27, 43, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 24px -18px rgba(11, 27, 43, 0.25);
  padding: 14px max(24px, calc((100vw - 1200px) / 2));
}
html body .brand-logo { height: 24px; }
html body .brand-app { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); border-left-color: var(--line-2); }
html body nav .tab, html body header .link-btn {
  font-family: var(--font); font-weight: 500; font-size: 14px; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; transition: background .18s ease, color .18s ease;
}
html body nav .tab:hover, html body header .link-btn:hover { background: rgba(11, 27, 43, 0.05); color: var(--ink); }
html body nav .tab.active { background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--shadow-1); }

/* Page rhythm */
html body main { max-width: 1200px; margin: 0 auto; padding: 8px 24px 64px; }
html body .page-head { padding: 44px 0 20px; }
html body .page-head h2, html body #histTitle { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
html body .page-head .hint { font-size: 17px; margin-top: 8px; }

/* Cards */
html body .card {
  background: var(--surface); border: 1px solid rgba(11, 27, 43, 0.06); border-radius: 22px;
  box-shadow: var(--shadow-2); padding: 32px;
}
html body .card > h2:first-child { font-size: 22px; margin-top: 0; }

/* Buttons */
html body button {
  font-family: var(--font); font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em;
  border-radius: 12px; padding: 11px 20px; min-height: 42px;
  background: linear-gradient(180deg, #11799e 0%, var(--accent) 100%); color: #fff; border: 1px solid rgba(10, 79, 104, 0.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 1px 2px rgba(11, 27, 43, 0.12), 0 6px 16px -8px rgba(14, 102, 134, 0.55);
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
html body button:hover { background: linear-gradient(180deg, #0f6f91 0%, var(--accent-dark) 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 2px 4px rgba(11, 27, 43, 0.12), 0 10px 22px -10px rgba(14, 102, 134, 0.7); }
html body button:active { transform: translateY(1px); }
html body button:disabled { background: #b9c7d3; border-color: transparent; box-shadow: none; cursor: not-allowed; }
html body button.secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow-1);
}
html body button.secondary:hover { background: #f7fafc; border-color: #c4d0dc; }
html body button.small { min-height: 34px; padding: 7px 14px; font-size: 13.5px; border-radius: 10px; }
html body button.big { min-height: 50px; font-size: 16px; border-radius: 14px; }
html body .link-btn, html body .link-btn.inline { background: none; border: none; box-shadow: none; min-height: 0; padding: 0; color: var(--accent); font-weight: 600; }
html body .link-btn:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }

/* Fields */
html body input[type="text"], html body input[type="password"], html body input[type="email"], html body input[type="search"],
html body input[type="number"], html body input[type="tel"], html body select, html body textarea {
  font-family: var(--font); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; min-height: 46px;
  box-shadow: 0 1px 2px rgba(11, 27, 43, 0.04); transition: border-color .15s ease, box-shadow .15s ease;
}
html body input::placeholder, html body textarea::placeholder { color: #9aa8b6; }
html body input:hover, html body select:hover, html body textarea:hover { border-color: #c4d0dc; }
html body input:focus, html body select:focus, html body textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring); }
html body select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2333475b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
html body select[multiple] { background-image: none; padding-right: 14px; }
html body label.field, html body .field { font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* Questionnaire */
html body .card.quiz { padding: 40px 44px; }
html body .quiz-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; }
html body #quizStep { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
html body .qstep h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
html body .qstep h4 { font-size: 14px; font-weight: 600; color: var(--ink-2); }
html body .qselect { max-width: 620px; min-height: 50px; font-size: 15.5px; border-radius: 14px; margin: 4px 0 6px; }
html body .quiz-nav { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; }

/* Summary & result */
html body .qsum { gap: 20px; }
html body .qsum > div { background: linear-gradient(180deg, #fbfdff, #f5f8fb); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
html body .qsum dt { color: var(--muted); font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
html body .qsum dd { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
html body .cmp-wrap h3 { font-size: 22px; font-weight: 800; margin: 34px 0 6px; }

/* Price cards */
html body .cmp-cards { gap: 16px; }
html body .cmp-card {
  border: 1px solid rgba(11, 27, 43, 0.07); border-radius: 20px; padding: 22px 24px;
  box-shadow: var(--shadow-2); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
html body .cmp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
html body .cmp-card.best { border-color: rgba(26, 127, 55, 0.45); box-shadow: 0 0 0 3px rgba(26, 127, 55, 0.08), var(--shadow-2); background: linear-gradient(180deg, #fbfffc, #fff 40%); }
html body .cmp-card.chosen { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring), var(--shadow-3); }
html body .cmp-rank { background: linear-gradient(135deg, var(--accent-2), var(--accent)); width: 32px; height: 32px; font-family: var(--display); font-size: 14px; box-shadow: 0 6px 14px -6px rgba(14, 102, 134, 0.7); }
html body .cmp-zone { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink); }
html body .cmp-pkg { color: var(--muted); font-size: 13.5px; }
html body .cmp-card-total b { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
html body .cmp-low { font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: 10.5px; padding: 3px 9px; }
html body .cmp-mini { border-top: 1px solid var(--line); margin-top: 12px; }
html body .cmp-mini th, html body .cmp-mini td { padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
html body .cmp-mini th { color: var(--muted); font-weight: 500; }
html body .cmp-mini td { font-variant-numeric: tabular-nums; font-weight: 500; }
html body .cmp-mini .cmp-total th, html body .cmp-mini .cmp-total td { border-bottom: none; color: var(--ink); font-weight: 700; padding-top: 14px; }

/* Chosen package bar */
html body .qlock { background: linear-gradient(135deg, #0b3a4f 0%, #0e6686 60%, #13a3c4 130%); color: #fff; border: none; border-radius: 20px; padding: 22px 26px; box-shadow: var(--shadow-3); }
html body .qlock .muted, html body .qlock b { color: #fff; }
html body .qlock .muted { opacity: .75; }
html body .qlock-price { font-family: var(--display); font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
html body .qlock button.secondary { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.35); box-shadow: none; }
html body .qlock button.secondary:hover { background: rgba(255, 255, 255, 0.24); }

/* Activity steps */
html body .wf-step { font-family: var(--display); font-size: 19px; font-weight: 700; margin: 30px 0 14px; }
html body .wf-num { background: linear-gradient(135deg, var(--accent-2), var(--accent)); width: 30px; height: 30px; min-width: 30px; box-shadow: 0 6px 14px -6px rgba(14, 102, 134, 0.7); }
html body .wf-tile { border: 1px solid var(--line); border-radius: 18px; padding: 20px; gap: 6px; box-shadow: var(--shadow-1); transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
html body .wf-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #c4d0dc; background: #fff; }
html body .wf-tile.on { border-color: var(--accent-2); background: linear-gradient(180deg, #f2fbfe, #fff); box-shadow: 0 0 0 3px var(--ring), var(--shadow-2); }
html body .wf-t { font-family: var(--display); font-size: 17px; font-weight: 700; }
html body .wf-n { font-weight: 600; }
html body #qExactKw { min-height: 54px; font-size: 16px; border-radius: 16px; padding-left: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3E%3Ccircle cx='8' cy='8' r='6' stroke='%236b7a8c' stroke-width='1.8'/%3E%3Cpath d='m12.5 12.5 4 4' stroke='%236b7a8c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px center; }
html body .qexact-row { border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow-1); transition: box-shadow .2s ease, border-color .2s ease; }
html body .qexact-row:hover { border-color: #c9d6e2; box-shadow: var(--shadow-2); }
html body .qexact-top b { font-family: var(--display); font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
html body .wf-detail { gap: 10px; }
html body .wf-detail dt { font-size: 13px; font-weight: 500; }
html body .wf-detail dd { font-size: 14px; }

/* Tags */
html body .tag { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; letter-spacing: .01em; border: 1px solid transparent; }
html body .acode { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: #f1f4f8; color: var(--ink-2); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; }

/* Final quote */
html body .final-quote { border: none; border-radius: 22px; padding: 28px 30px; box-shadow: 0 0 0 1px rgba(14, 102, 134, 0.18), var(--shadow-3); background: linear-gradient(180deg, #f6fbfd, #fff 90px); }
html body .fq-total { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent-dark); }

/* Tables */
html body table.grid { border-collapse: separate; border-spacing: 0; width: 100%; }
html body table.grid thead th { background: #f7f9fc; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; border-bottom: 1px solid var(--line); }
html body table.grid thead th:first-child { border-top-left-radius: 12px; }
html body table.grid thead th:last-child { border-top-right-radius: 12px; }
html body table.grid tbody td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
html body table.grid tbody tr:hover td { background: #fafcfe; }

/* Admin sub-tabs: segmented control */
html body .subtabs { display: inline-flex; gap: 4px; padding: 5px; background: rgba(11, 27, 43, 0.05); border-radius: 14px; margin: 28px 0 8px; flex-wrap: wrap; }
html body .subtab { background: transparent; color: var(--ink-2); border: none; box-shadow: none; min-height: 36px; padding: 8px 16px; border-radius: 10px; font-weight: 500; }
html body .subtab:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
html body .subtab.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1), 0 2px 8px -2px rgba(11, 27, 43, 0.12); }

/* Chips, banners, messages */
html body .qchip { border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 500; padding: 7px 14px; box-shadow: var(--shadow-1); }
html body .qchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
html body .banner { background: linear-gradient(90deg, #fff7e6, #fffaf0); border-bottom: 1px solid #f5e1b8; color: #6b4e16; font-weight: 500; }
html body .qwarn { border-radius: 14px; border: 1px solid #f5d9a8; background: #fffaf0; }

/* Sign-in */
html body .auth { border-radius: 28px; box-shadow: 0 0 0 1px rgba(11, 27, 43, 0.05), 0 40px 80px -24px rgba(11, 27, 43, 0.28); margin-top: 72px; }
html body .auth-brand h2 { font-family: var(--display); font-size: 38px; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--ink) 30%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html body .auth-brand p { font-size: 16px; }
html body .auth-form button[type="submit"] { width: 100%; min-height: 52px; font-size: 16px; border-radius: 14px; }

/* Footer */
html body .site-foot { background: transparent; border-top: 1px solid var(--line); }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html body .view:not([hidden]) { animation: pmFade .35s ease both; }
  @keyframes pmFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  html body .card, html body .card.quiz { padding: 22px 18px; border-radius: 18px; }
  html body main { padding: 4px 14px 48px; }
  html body header.top { padding: 12px 16px; }
}
html body header.top { height: auto; min-height: 64px; }
html body nav .tab, html body header .link-btn { height: auto; line-height: 1.2; }
html body select:not([multiple]) {
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2333475b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 16px center !important;
}
