/* Great Southern Websites - sibling of the Great Southern Software palette:
   ink, star, sightline, paper, muted. Light is the default; dark is the same
   five colours with ink and paper swapped. */
:root {
  color-scheme: light;
  --ink: #0E1726;
  --ink-raised: #16233A;
  --star: #E8B04B;
  --star-ink: #7A5312;
  --sightline: #8FB8D9;
  --sightline-deep: #2F6C9A;
  --paper: #F4F6F8;
  --paper-dim: #C7D2DC;
  --muted: #5F7182;

  --bg: var(--paper);
  --bg-card: #FFFFFF;
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --line: #D6DEE6;
  --accent: var(--sightline-deep);
  --accent-contrast: #FFFFFF;
  --ok: #1F7A4D;
  --warn: #9A6B00;
  --bad: #B3261E;
  --shadow: 0 10px 30px rgba(14, 23, 38, 0.08);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --container: 68rem;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0A0F18;
  --bg-card: var(--ink-raised);
  --fg: var(--paper);
  --fg-muted: var(--paper-dim);
  --line: #2A3A50;
  --accent: var(--sightline);
  --accent-contrast: var(--ink);
  --ok: #6FCF97;
  --warn: var(--star);
  --bad: #F28B82;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0F18;
  --bg-card: var(--ink-raised);
  --fg: var(--paper);
  --fg-muted: var(--paper-dim);
  --line: #2A3A50;
  --accent: var(--sightline);
  --accent-contrast: var(--ink);
  --ok: #6FCF97;
  --warn: var(--star);
  --bad: #F28B82;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; padding-block: 1.5rem 3rem; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
pre { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; overflow-x: auto; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--star); color: var(--ink); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; z-index: 10; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.1rem; width: 100%; }
.small { font-size: 0.9rem; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
[hidden] { display: none !important; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); text-decoration: none; font-family: var(--font-display); font-weight: 600; }
.brand-mark { width: 32px; height: 32px; color: var(--fg-muted); display: block; }
.brand-name b { color: var(--accent); font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 0.6rem; }
.site-nav > a { color: var(--fg); text-decoration: none; font-weight: 500; padding: 0.4rem 0.6rem; border-radius: 8px; }
.site-nav > a:hover { background: var(--bg-card); }
.theme-toggle { border: 1px solid var(--line); background: var(--bg-card); color: var(--fg); width: 2.4rem; height: 2.4rem; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle .icon { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.auth-area { display: flex; align-items: center; gap: 0.5rem; }
.auth-email { font-size: 0.9rem; color: var(--fg-muted); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .brand-name { display: none; }
  .auth-email { display: none; }
  .site-nav > a[href="/dns"] { display: none; }
}

/* buttons + forms */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--bg-card); color: var(--fg); padding: 0.65rem 1.05rem; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { padding: 0.4rem 0.75rem; min-height: 2.2rem; font-size: 0.92rem; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-link { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
input, textarea, select { font: inherit; color: var(--fg); background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; width: 100%; min-height: 2.75rem; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field { margin-bottom: 1rem; }
.form-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.form-row > input { flex: 1 1 16rem; }
.msg { min-height: 1.4em; margin: 0.5rem 0 0; font-size: 0.95rem; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* cards */
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 0.75rem; }
.stack > * + * { margin-top: 1rem; }

/* hero */
.hero { padding-block: clamp(2rem, 7vw, 5rem) 2rem; text-align: center; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.hero .eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 0.6rem; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--fg-muted); max-width: 40rem; margin: 0.5rem auto 1.5rem; }
.url-form { max-width: 38rem; margin-inline: auto; }
.url-form input { font-size: 1.05rem; }
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 3rem; text-align: left; }
.steps .n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--star); color: var(--ink); font-weight: 700; font-family: var(--font-display); margin-bottom: 0.5rem; }

/* status */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-muted); white-space: nowrap; }
.badge.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge.busy { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-box { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; }
.progress-box .spinner { width: 2.4rem; height: 2.4rem; border-width: 3px; margin-bottom: 1rem; }
.progress-box .phase { font-size: 1.15rem; font-weight: 600; }

/* site page */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1.25rem; }
.page-head .crumbs { font-size: 0.9rem; }
.preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.preview iframe { width: 100%; height: min(70vh, 640px); border: 0; display: block; }
.preview-bar { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 0.6rem 0.9rem; background: var(--bg-card); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.edit-grid { display: grid; gap: 1.5rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .edit-grid { grid-template-columns: 1fr 1fr; } }
.settings-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .settings-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.head-actions { display: flex; align-items: center; gap: 0.6rem; }
textarea { min-height: 9rem; }
.change { padding: 0.35rem 0; border-top: 1px solid var(--line); }
.change:first-of-type { border-top: 0; }
.change .text { white-space: pre-wrap; margin: 0.6rem 0 0.5rem; }
.change-summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; cursor: pointer; padding: 0.55rem 0.25rem; border-radius: 8px; }
.change-summary::-webkit-details-marker { display: none; }
.change-summary:hover { background: var(--bg-alt, var(--bg)); }
.change-summary::before { content: ""; flex: 0 0 auto; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--fg-muted); border-bottom: 2px solid var(--fg-muted); transform: rotate(-45deg); margin-right: 0.25rem; transition: transform 0.15s; }
details[open] > .change-summary::before { transform: rotate(45deg); }
.change-summary-main { display: flex; align-items: center; gap: 0.5rem; min-width: 0; flex: 1; }
.change-summary-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-summary-meta { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.change-body { padding: 0 0.25rem 0.6rem 1.25rem; }
@media (max-width: 640px) { .change-summary-meta .small:not(:last-child) { display: none; } }
.change .outcome { color: var(--fg-muted); font-size: 0.95rem; margin: 0.35rem 0 0; white-space: pre-wrap; }
.change-reply { margin: 0.5rem 0 0 0; padding-left: 0.75rem; border-left: 3px solid var(--line); border-top: 0; }
.follow-up { margin-top: 0.5rem; }
.follow-up textarea { min-height: 5rem; }
.follow-up .actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.btn-link.small { font-size: 0.9rem; }
.swatches { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.swatch { width: 1.6rem; height: 1.6rem; border-radius: 6px; border: 1px solid var(--line); }
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(--line); vertical-align: top; }
th { font-weight: 600; color: var(--fg-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-wrap { overflow-x: auto; }
.price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.price s { color: var(--fg-muted); font-size: 1.2rem; font-weight: 500; margin-right: 0.4rem; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(5, 10, 20, 0.55); display: grid; place-items: center; padding: 1rem; z-index: 20; }
.modal { background: var(--bg-card); color: var(--fg); border-radius: var(--radius); padding: 1.5rem; width: min(26rem, 100%); box-shadow: var(--shadow); border: 1px solid var(--line); }
.modal h2 { font-size: 1.4rem; }
.modal .actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--fg-muted); font-size: 0.85rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gbtn { width: 100%; justify-content: center; }
.gbtn svg { width: 1.1rem; height: 1.1rem; }

/* footer (same shape as bin-space.app) */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem; font-size: 0.88rem; color: var(--fg-muted); }
.footer-inner { display: flex; justify-content: center; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); text-decoration: none; }
.footer-brand:hover { color: var(--fg); text-decoration: underline; }
.footer-mark { width: 26px; height: 26px; border-radius: 7px; }
.notice { border-left: 4px solid var(--star); background: var(--bg-card); padding: 0.8rem 1rem; border-radius: 8px; }
.notice.bad { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--ok); }
