/* Signed-in platform pages: sign-in, My account (owners) and Admin.
   The header and footer match the homepage (styles.css); this sheet is separate so the
   marketing pages' ?v= cache-buster is untouched by account changes (it versions by mtime). */
:root {
  --blue: #0877d1;
  --blue-dark: #0768b5;
  --ink: #142b42;
  --text: #2c3e50;
  --muted: #536579;
  --line: #dce6ef;
  --line-soft: #edf1f5;
  --pale: #f4f8fc;
  --danger: #b42318;
  --ok: #157f3b;
  --warn: #9a6700;
  --font: Inter, Arial, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--pale); color: var(--ink); font: 15px/1.55 var(--font); }
a { color: var(--blue-dark); }
:focus-visible { outline: 3px solid #148be5; outline-offset: 3px; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.8px; }
h2 { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -0.2px; }
p { margin: 0; }
code { font-size: 13px; background: #e9f0f7; padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 30; background: #fff; padding: 14px; }
.skip:focus { top: 10px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13.5px; }
.warn { color: var(--warn); font-weight: 600; }

/* ---------------------------------------------- header (as on the homepage) */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line-soft); }
.top-inner { width: min(1240px, 100% - 40px); margin-inline: auto; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 23px; line-height: 1; font-weight: 800; letter-spacing: -1px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand > span { color: var(--blue); }
.brand-icon { width: 30px; height: 30px; margin-right: 9px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.top-nav { display: flex; align-items: center; gap: 28px; font-size: 13.5px; font-weight: 500; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top-nav a:hover { color: var(--blue); }
.account-pill { gap: 8px; padding: 0 18px; border: 1px solid var(--blue); border-radius: 28px; background: var(--blue); color: #fff !important; font-weight: 600; }
.account-pill:hover { background: var(--blue-dark); }
.account-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 760px) {
  .top-nav > a:not(.account-pill) { display: none; }
  .top-inner { min-height: 64px; width: calc(100% - 32px); }
  .brand { font-size: 20px; }
  .brand-icon { width: 26px; height: 26px; }
}

/* ---------------------------------------------------- shell and sidebar */
.shell { flex: 1; width: min(1240px, 100% - 40px); margin: 28px auto 64px; }
.shell.has-side { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 32px; align-items: start; }
.page { min-width: 0; }
.shell:not(.has-side) .page { width: min(1000px, 100%); margin-inline: auto; }
.side { position: sticky; top: 100px; display: grid; gap: 4px; }
.side-title { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 6px 12px; }
.side-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 16px 0 4px 12px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side a:hover { background: #e8f0f8; }
.side a[aria-current="page"] { background: #fff; color: var(--blue-dark); font-weight: 650; box-shadow: 0 1px 2px rgba(20, 43, 66, 0.08); }
.side-badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.side-switch { margin: 16px 0 0 12px; font-size: 14px; }
.side-account { margin: 18px 0 0 12px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.side-account .btn-link { justify-self: start; padding: 0; min-height: 36px; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 32px); margin-top: 16px; }
  .shell.has-side { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .side { position: static; overflow-x: auto; display: flex; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side-title, .side-label, .side-switch { display: none; }
  .side nav { display: flex; gap: 6px; }
  .side ul { display: flex; gap: 6px; }
  .side a { white-space: nowrap; min-height: 40px; background: #fff; border: 1px solid var(--line); }
  .side a[aria-current="page"] { border-color: var(--blue); box-shadow: none; }
  .side-account { display: none; }
}

/* ---------------------------------------------------------------- pages */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.page-head .sub { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); overflow-wrap: anywhere; }
.crumbs { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 0 0 18px; }
.card.narrow { max-width: 440px; margin: 24px auto; }
.card > h2, .card > form > h2 { margin-bottom: 10px; }
.card > p + p, .card > p + .actions, .card > p + meter { margin-top: 10px; }
.card > p + form { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 14px; }
.card-head a { font-size: 14px; font-weight: 600; }
.card.empty { text-align: left; }
.grid { display: grid; gap: 18px; }
.grid > .card, .stack-cards > .card { margin: 0; }
.stack-cards { display: grid; gap: 18px; align-content: start; }
@media (min-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } .grid > .wide { grid-column: 1 / -1; } }
.big { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.big span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* Tabs and filter chips */
.tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 480px; }
.chips, .period { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.toolbar .chips { margin: 0; }
.chips a, .period a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.chips a span { color: var(--muted); font-weight: 500; }
.chips a[aria-current="true"], .period a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips a[aria-current="true"] span { color: #c9d6e3; }

/* Forms */
.stack { display: grid; gap: 8px; }
.stack > .btn, .stack > .btn-secondary { justify-self: start; margin-top: 6px; }
label { font-weight: 600; font-size: 14px; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c8d6; border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #b9dcf8; outline-offset: 0; border-color: var(--blue); }
.inline-field { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.inline-field input { flex: 1 1 auto; min-width: 0; }
.inline-field input[inputmode=numeric] { flex: 0 0 96px; }
.unit { color: var(--muted); white-space: nowrap; }
.copy { font-size: 14px !important; margin: 4px 0 8px; background: var(--pale) !important; }
.choices { border: 0; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.choices.stacked { display: grid; }
.choice { position: relative; display: flex; cursor: pointer; font-weight: 500; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice > span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; }
.choice input:checked + span { border-color: var(--blue); background: #eef6fd; color: var(--blue-dark); font-weight: 650; }
.choice input:focus-visible + span { outline: 3px solid #148be5; outline-offset: 2px; }
.choice-block > span { display: grid; gap: 1px; width: 100%; padding: 10px 14px; border-radius: 12px; }
.choice-block small { color: var(--muted); font-weight: 400; font-size: 13px; }
.choice-block input:checked + span small { color: var(--blue-dark); }

/* Buttons (pill-shaped, as on the homepage) */
.btn, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 28px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 0.15s; }
.btn:hover { background: var(--blue-dark); }
.btn-secondary { background: #fff; color: var(--blue-dark); }
.btn-secondary:hover { background: #eef6fd; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-link { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--blue-dark); font: inherit; text-decoration: underline; cursor: pointer; }
.btn-link.danger { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions form { margin: 0; }
.page-head .actions { margin: 0; }

/* Messages */
.flash { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; overflow-wrap: anywhere; }
.flash-success { background: #ecf8f0; border-color: #b7e2c4; color: var(--ok); }
.flash-error { background: #fdf0ef; border-color: #f2c4bf; color: var(--danger); }
.flash-info { background: #eef6fd; border-color: #c3dcf3; }
.notice { background: #fff8e6; border: 1px solid #f1dda3; padding: 10px 14px; border-radius: 10px; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.card .table-wrap { border: 0; border-radius: 0; margin: 0 -22px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status pills */
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #e9f0f7; color: var(--ink); white-space: nowrap; }
.status-live { background: #ecf8f0; color: var(--ok); }
.status-preview { background: #eef6fd; color: var(--blue-dark); }
.status-draft { background: #f1f3f6; color: var(--muted); }
.status-offline { background: #fdf0ef; color: var(--danger); }

meter { width: 100%; height: 10px; margin: 6px 0 0; }

/* Facts and headline numbers */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--pale); border-radius: 10px; padding: 12px 14px; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 750; font-size: 20px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
a.kpi:hover { border-color: var(--blue); }
.kpi p { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { display: block; margin-top: 4px; font-size: 28px; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; }

/* Site cards (My account, several websites) */
.site-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.site-card { margin: 0; display: grid; gap: 10px; align-content: start; }
.site-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.site-card h2 a { color: var(--ink); text-decoration: none; }
.site-url { overflow-wrap: anywhere; }
.site-url a { display: inline-flex; align-items: center; min-height: 36px; }

/* Lists of things to act on */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line-soft); }
.mini-list a { display: grid; gap: 2px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.mini-list a:hover strong { color: var(--blue-dark); }
.mini-list span { color: var(--muted); font-size: 14px; }

/* Change requests */
.requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.request { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.request-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; font-size: 13.5px; }
.request-head time { color: var(--muted); margin-left: auto; }
.request-head a { font-weight: 650; }
.request-msg { white-space: normal; overflow-wrap: anywhere; }
.req-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #fff4d6; color: var(--warn); }
.req-free, .req-accepted { background: #eef6fd; color: var(--blue-dark); }
.req-quoted { background: #f3ecff; color: #5b3db5; }
.req-done { background: #ecf8f0; color: var(--ok); }
.req-declined, .req-refused { background: #f1f3f6; color: var(--muted); }
.reply { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--pale); }
.reply-from { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.quote-box { margin-top: 12px; padding: 14px; border-radius: 10px; background: #f8f5ff; border: 1px solid #e3d9fb; }
.quote-box .actions { margin-top: 10px; }
.quote-box .hint { margin-top: 8px; }
.answer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.answer-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.answer-fields label { display: grid; gap: 4px; flex: 0 0 120px; }
.answer-fields .grow { flex: 1 1 260px; }

/* Settings rows */
.settings { padding: 0; }
.setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px 22px; border-top: 1px solid var(--line-soft); }
.setting:first-of-type { border-top: 0; }
.setting h2 { margin: 0 0 2px; font-size: 16px; }
.setting .hint { max-width: 52ch; }
.setting .inline-field { margin: 0; }
.setting-foot { padding: 16px 22px; border-top: 1px solid var(--line-soft); background: var(--pale); border-radius: 0 0 14px 14px; }

/* ---------------------------------------------------------------- analytics */
.an-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.an-head .period { margin: 0; }
.an-chart .bars { display: block; width: 100%; height: 190px; }
.bars rect { fill: var(--blue); }
.bars rect:hover { fill: var(--ink); }
.bars line { stroke: var(--line); stroke-width: 1; }
.bars-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.an-grid { display: grid; gap: 18px; }
.an-grid > .card { margin: 0; }
@media (min-width: 900px) { .an-grid { grid-template-columns: 1fr 1fr; } .an-wide { grid-column: 1 / -1; } }
.an-table td, .an-table th { padding: 9px 0; }
.an-table th + th, .an-table td + td { padding-left: 14px; }
.an-table .share { width: 32%; }
.an-table .share meter { margin: 0; height: 8px; }
.an-table .path { overflow-wrap: anywhere; font-weight: 500; }
.table-scroll { overflow-x: auto; }
.an-map .world { display: block; width: 100%; height: auto; }
.world path { fill: #e4ebf2; stroke: #fff; stroke-width: 0.5; }
.world path.lv-1 { fill: #b9dcf8; }
.world path.lv-2 { fill: #7fbcee; }
.world path.lv-3 { fill: #3f98e0; }
.world path.lv-4 { fill: #0877d1; }
.world path.lv-5 { fill: #0b4f8a; }
.world path:hover { stroke: var(--ink); stroke-width: 1; }

/* ---------------------------------------------- footer (as on the homepage) */
.foot { background: #fff; border-top: 1px solid #e5ecf3; }
.foot-inner { width: min(1240px, 100% - 40px); margin-inline: auto; padding-block: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px; font-size: 12.5px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.foot a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--blue); }
@media (max-width: 760px) { .foot-inner { width: calc(100% - 32px); } }

/* Meters in the brand blue (storage, shares). */
meter { appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: #e9f0f7; }
meter::-webkit-meter-bar { background: #e9f0f7; border: 0; border-radius: 5px; height: 100%; }
meter::-webkit-meter-optimum-value { background: var(--blue); border-radius: 5px; }
meter::-webkit-meter-suboptimum-value { background: #e0a100; border-radius: 5px; }
meter::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 5px; }
meter::-moz-meter-bar { background: var(--blue); border-radius: 5px; }
.an-table meter::-webkit-meter-suboptimum-value, .an-table meter::-webkit-meter-even-less-good-value { background: var(--blue); }
@media (min-width: 1100px) {
  .an-grid { grid-template-columns: repeat(6, 1fr); }
  .an-grid > .card { grid-column: span 3; }
  .an-grid > .an-wide { grid-column: 1 / -1; }
  .an-grid > .an-third { grid-column: span 2; }
}
.card > h1 + p { margin-top: 8px; } .card > h1 + p + form, .card > p + .stack { margin-top: 16px; }

/* ------------------------------------------------- icons and the phone tab bar */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side a { justify-content: flex-start; gap: 11px; }
.side a .side-text { flex: 1; }
.side a .icon { color: var(--muted); }
.side a[aria-current="page"] .icon { color: var(--blue); }
.tabbar { display: none; }
@media (max-width: 900px) {
  /* My account: the sections move to a bar fixed along the bottom, like an app. */
  .shell.has-tabbar .side { display: none; }
  .shell.has-tabbar { margin-bottom: 96px; }
  .tabbar {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(20, 43, 66, 0.06);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 56px; padding: 7px 4px 5px; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
  .tabbar a .icon { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--blue-dark); background: #eef6fd; }
  .tab-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
  .shell.has-tabbar ~ .foot { padding-bottom: 84px; }
}

/* ---------------------------------------------------------------- odds and ends */
.page-hint { margin: -8px 0 16px; }
.kpi .kpi-small { font-size: 17px; letter-spacing: -0.2px; }
.tab-count { margin-left: 6px; color: var(--muted); font-weight: 500; }
.gap { margin-top: 12px; display: block; }
.picker { display: flex; align-items: center; gap: 8px; }
.picker label { white-space: nowrap; color: var(--muted); }
.picker select { min-width: 200px; width: auto; }
.picker button[hidden] { display: none; }
@media (max-width: 600px) { .picker { width: 100%; } .picker select { flex: 1; min-width: 0; } }
.site-note { color: var(--muted); }
.storage-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.site-card meter { margin-top: 0; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* Request lists */
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li + li { border-top: 1px solid var(--line-soft); }
.req-row { display: grid; gap: 4px; padding: 12px 4px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.req-row:hover { background: var(--pale); }
.req-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; }
.req-row-top time { margin-left: auto; color: var(--muted); }
.req-row-text { color: var(--text); overflow-wrap: anywhere; }
.req-row.is-unread .req-row-text { font-weight: 650; color: var(--ink); }
.new-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--danger); font-weight: 700; font-size: 12.5px; }
.new-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.req-new, .req-in_progress { background: #fff4d6; color: var(--warn); }
.req-waiting { background: #eef6fd; color: var(--blue-dark); }

/* A request as a conversation: the owner on the left, us on the right. */
.req-layout { display: grid; gap: 18px; }
.req-layout > aside { display: grid; gap: 18px; align-content: start; }
.req-layout .card { margin: 0; }
@media (min-width: 1100px) { .req-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.msg { max-width: 88%; padding: 14px 16px; border-radius: 14px; background: var(--pale); }
.msg-owner { justify-self: start; border-bottom-left-radius: 4px; }
.msg-us { justify-self: end; background: #eef6fd; border-bottom-right-radius: 4px; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; font-size: 13px; }
.msg-meta time { color: var(--muted); }
.msg-body { overflow-wrap: anywhere; }
.msg-system { justify-self: center; max-width: none; padding: 6px 12px; background: none; color: var(--muted); font-size: 13px; text-align: center; }
.msg-system time { margin-left: 6px; }
.quote-box { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid #e3d9fb; }
.quote-box .actions { margin-top: 10px; }
.quote-box .hint { margin-top: 8px; }
.quote-state { margin-top: 6px; font-weight: 650; color: var(--muted); }
.quote-state.ok { color: var(--ok); }
.reply-extras { display: flex; flex-wrap: wrap; gap: 10px; }
.reply-extras label { display: grid; gap: 4px; flex: 1 1 180px; }
.reply-extras small, .file-field small { font-weight: 400; color: var(--muted); }

/* Attachments */
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file-thumb { display: block; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-link { display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: 280px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.file-link:hover { border-color: var(--blue); }
.file-link span:last-child { display: grid; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.file-link small { font-weight: 400; color: var(--muted); font-size: 12px; }
.file-kind { flex: none; display: grid; place-items: center; width: 40px; height: 36px; border-radius: 8px; background: var(--pale); color: var(--blue-dark); font-size: 11px; font-weight: 800; }
.file-field { display: grid; gap: 6px; }
.file-field input[type=file] { font: inherit; font-size: 15px; max-width: 100%; }

/* ---------------------------------------------- the header's account menu */
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.account-drop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 240px; padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: 0 12px 32px rgba(20, 43, 66, 0.16); display: grid;
}
.account-who { display: grid; gap: 1px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.account-who strong { color: var(--ink); font-size: 14px; }
.account-drop a, .account-drop button {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink) !important;
  font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; width: 100%;
}
.account-drop a:hover, .account-drop button:hover { background: var(--pale); }
.account-drop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.account-drop button { color: var(--danger) !important; font-weight: 600; }

/* --------------------------------------------- phones: tab bar, no footer */
@media (max-width: 900px) {
  .shell.has-tabbar ~ .foot { display: none; }
  .tabbar a { font-size: 11.5px; }
}

/* ------------------------------------------------------- website cards */
.site-card { padding: 0; overflow: hidden; }
.site-card-body { display: grid; gap: 10px; padding: 18px 20px 20px; }
.site-thumb { display: block; width: 100%; height: 150px; object-fit: cover; object-position: center; background: var(--pale); }
.site-thumb-empty { display: grid; place-items: center; color: #9db3c8; font-size: 48px; font-weight: 800; }
.site-card .actions { margin-top: 4px; }
.site-card .actions .btn, .site-card .actions .btn-secondary { min-height: 42px; padding: 0 16px; }

/* ------------------------------------------------------------- requests */
.req-item { display: flex; align-items: center; gap: 6px; }
.req-item .req-row { flex: 1; min-width: 0; }
.req-del { margin: 0; }
.req-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f3f6; color: var(--muted); }
.req-tag-deleted { background: #fdf0ef; color: var(--danger); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: #fdf0ef; color: var(--danger); }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 28px; border: 1px solid #f2c4bf; background: #fff; color: var(--danger); font: inherit; font-weight: 650; cursor: pointer; }
.btn-danger:hover { background: #fdf0ef; }
.btn-danger .icon { width: 18px; height: 18px; }
.empty-state { display: grid; gap: 10px; justify-items: start; padding: 8px 0; }
.empty-state p { color: var(--muted); max-width: 46ch; }

/* ----------------------------------------------------- the storage sheet */
.sheet { width: min(460px, 100% - 24px); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 24px 64px rgba(20, 43, 66, 0.28); }
.sheet::backdrop { background: rgba(20, 43, 66, 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--line-soft); }
.sheet-head h2 { font-size: 18px; }
.sheet .storage-form { padding: 18px 22px 22px; }
@media (max-width: 600px) {
  /* On a phone the sheet rises from the bottom and fills most of the screen. */
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92%; }
}
.close-btn { position: relative; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--pale); cursor: pointer; }
.close-btn::before, .close-btn::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px; background: var(--ink); border-radius: 1px; transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }
.storage-form { display: grid; gap: 12px; }
.storage-now { color: var(--muted); }
.storage-size { display: flex; justify-content: space-between; align-items: baseline; }
.storage-size output { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; color: var(--ink); }
.storage-form input[type=range] { width: 100%; accent-color: var(--blue); height: 32px; }
.storage-scale { display: flex; justify-content: space-between; margin-top: -8px; font-size: 12.5px; color: var(--muted); }
.storage-price { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--pale); }
.storage-price p { font-size: 13px; color: var(--muted); font-weight: 600; }
.storage-price strong { font-size: 28px; letter-spacing: -0.8px; }
.storage-price span { font-size: 13.5px; color: var(--muted); }
.narrow-card { max-width: 520px; }
.storage-form .actions { margin-top: 4px; }

/* A grid cell grows to fit its widest child unless told otherwise, and a wide table then
   pushes the whole page past a phone's screen. Cells may shrink; tables scroll inside. */
.grid > *, .an-grid > *, .req-layout > *, .stack-cards > * { min-width: 0; }
@media (max-width: 900px) {
  .table-wrap td, .table-wrap th { white-space: nowrap; }
  .table-wrap td .muted { display: block; }
}

/* Tables become cards on a phone (account.js adds data-label from the column headings). */
@media (max-width: 700px) {
  .table-wrap.stacks { overflow: visible; background: none; border: 0; }
  .card .table-wrap.stacks { margin: 0; }
  .table-wrap.stacks table, .table-wrap.stacks tbody, .table-wrap.stacks tr, .table-wrap.stacks td { display: block; width: 100%; }
  .table-wrap.stacks thead { display: none; }
  .table-wrap.stacks tr { padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .card .table-wrap.stacks tr { background: var(--pale); border-color: transparent; }
  .table-wrap.stacks td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; white-space: normal; text-align: right; }
  .table-wrap.stacks td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; max-width: 50%; }
  .table-wrap.stacks td:first-child { display: block; text-align: left; padding-bottom: 6px; }
  .table-wrap.stacks td:first-child::before { content: none; }
  .table-wrap.stacks td.num { text-align: right; }
}

/* Confirmation windows (forms with data-confirm). */
dialog.confirm { width: min(400px, 100% - 32px); padding: 24px; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 24px 64px rgba(20, 43, 66, 0.28); }
dialog.confirm::backdrop { background: rgba(20, 43, 66, 0.45); }
.confirm-text { font-size: 16px; font-weight: 600; }
.btn-danger-fill { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }

/* The site's status, as the steps it moves through. */
.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.journey li { position: relative; display: grid; gap: 1px; padding: 8px 0 8px 30px; color: var(--muted); }
.journey li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.journey li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 28px; bottom: -8px; width: 2px; background: var(--line); }
.journey li strong { color: var(--muted); font-size: 15px; }
.journey li span { font-size: 13.5px; }
.journey li.is-done::before { background: var(--blue); border-color: var(--blue); }
.journey li.is-current::before { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px #d6eafb; }
.journey li.is-current strong { color: var(--ink); }
.more { margin-top: 12px; }
.more summary { cursor: pointer; color: var(--blue-dark); font-weight: 600; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }

/* Website card buttons: equal widths, wrapping in even rows. */
.site-card .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.site-card .actions form, .site-card .actions .btn, .site-card .actions .btn-secondary, .site-card .actions button { width: 100%; }
.btn-launch { gap: 8px; grid-column: 1 / -1; background: var(--ok) !important; border-color: var(--ok) !important; color: #fff !important; }
.btn-launch:hover { background: #106631 !important; }
.btn-launch .icon { width: 19px; height: 19px; }
.btn-wide { width: 100%; min-height: 52px; font-size: 16px; }

/* A switch-style checkbox (Settings). */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; font-size: 15px; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 13px; background: #c9d6e3; cursor: pointer; transition: background-color 0.15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 43, 66, 0.25); transition: transform 0.15s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(18px); }

/* Billing and summaries. */
.bill { margin-bottom: 18px; }
.bill-lines { display: grid; gap: 0; margin: 0 0 10px; }
.bill-lines div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.bill-lines dt { color: var(--muted); overflow-wrap: anywhere; }
.bill-lines dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.bill-total { border-bottom: 0 !important; }
.bill-total dt { color: var(--ink); font-weight: 700; }
.bill-total dd { font-size: 20px; font-weight: 800; }

/* Launch: two option cards, domain search, summary. */
.choice-cards { display: grid; gap: 12px; margin-bottom: 18px; }
@media (min-width: 700px) { .choice-cards { grid-template-columns: 1fr 1fr; } }
.choice-card { display: grid; gap: 4px; padding: 20px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; }
.choice-card:hover { border-color: #9cc8ee; }
.choice-card.is-chosen { border-color: var(--blue); background: #f2f8fe; }
.choice-card strong { font-size: 17px; }
.choice-card .addr { font-weight: 600; color: var(--blue-dark); overflow-wrap: anywhere; }
.choice-card .endings { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.choice-card .endings span { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.info-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--blue-dark); font-size: 14px; font-weight: 600; text-decoration: none; }
.info-link:hover { text-decoration: underline; }
.info-i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font: 700 13px/1 Georgia, serif; font-style: italic; }
.sheet-body { padding: 16px 22px 22px; overflow-y: auto; }
.sheet-body h3 { margin: 18px 0 6px; font-size: 15px; }
.ending-list { display: grid; gap: 0; margin: 0; }
.ending-list div { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.ending-list dt { font-weight: 700; overflow-wrap: anywhere; }
.ending-list dd { margin: 2px 0 0; color: var(--muted); }
.tips { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.bill-lines .years-line { align-items: center; padding: 6px 0; }
.years-line label { margin: 0; font: inherit; color: inherit; }
.years-line dd select { width: auto; min-width: 160px; font-size: 16px; }
.domain-search { display: flex; gap: 8px; }
.domain-search input { flex: 1; min-width: 0; }
.domains { list-style: none; margin: 16px 0 10px; padding: 0; display: grid; gap: 8px; }
.domain-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: var(--pale); }
.domain-name { flex: 1 1 180px; font-weight: 700; overflow-wrap: anywhere; }
.domain-state { font-size: 13px; font-weight: 700; }
.is-available .domain-state { color: var(--ok); }
.is-taken { opacity: 0.7; }
.is-taken .domain-state, .is-unknown .domain-state { color: var(--muted); }
.domain-price { font-weight: 600; }
.domain-row .btn-secondary { min-height: 40px; }
.summary h2 { margin-bottom: 8px; }
.summary form { margin-top: 14px; }
.launch-done { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 32px 22px; }
.launch-done p { max-width: 46ch; color: var(--muted); }
.done-icon { position: relative; width: 56px; height: 56px; border-radius: 50%; background: #ecf8f0; margin-bottom: 6px; }
.done-icon::after { content: ""; position: absolute; left: 20px; top: 15px; width: 13px; height: 22px; border-right: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(45deg); }

/* Admin: launches. */
.launch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.launch-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px; border-radius: 12px; background: var(--pale); }
.launch-item > div:first-child { min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.launch-state { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--warn); }
.launch-item .actions { margin: 0; align-items: center; }
.setting-wide { display: grid; gap: 10px; }
.setting-wide textarea { max-width: 360px; font-family: inherit; }

/* Billing: one bill, a line per website. */
.bill-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bill-site { padding: 14px 16px; border-radius: 12px; background: var(--pale); }
.bill-site-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bill-site-price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.bill-site-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.bill-parts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.bill-parts li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.bill-site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; margin-top: 10px; font-size: 13.5px; }
.bill-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.bill-links a { font-weight: 600; }
.bill-links form { margin: 0; }
.bill-links .btn-link { min-height: 36px; padding: 0; font-weight: 600; font-size: 13.5px; }
.bill-links a.danger { color: var(--danger); }
.bill-site.is-cancelled { opacity: 0.75; }
.cancel-form { display: grid; gap: 10px; }
.cancel-form p { margin: 0 0 4px; color: var(--muted); }
.cancel-form input { font-size: 16px; text-transform: uppercase; }
.bill-grand { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 6px; padding-top: 14px; border-top: 2px solid var(--line); font-weight: 700; }
.bill-grand strong { font-size: 24px; letter-spacing: -0.5px; }
.card > .bill-parts { margin-bottom: 10px; }

/* Admin > Accounts: sort by last active or joined. */
.sort-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; }
.sort-links span { margin-right: 4px; color: var(--muted); }
.sort-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.sort-links a[aria-current] { border-color: var(--blue); background: var(--blue); color: #fff; }

/* The pre-launch lock's "coming soon" page (html/gate.php). */
.gate-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate { width: min(440px, 100%); display: grid; gap: 12px; text-align: center; }
.gate-brand { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.gate-brand span { color: var(--blue); }
.gate h1 { margin: 0; font-size: 34px; letter-spacing: -0.8px; }
.gate .sub { margin: 0 0 12px; color: var(--muted); }
.gate-form { display: grid; gap: 8px; text-align: left; }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; font-size: 16px; }
.gate-error { margin: 0; color: var(--danger); font-weight: 600; }
