:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efede6;
  --text: #17161a;
  --muted: #64616b;
  --border: #dedad0;
  --accent: #ff5a1f;
  --accent-text: #ffffff;
  --accent-soft: #ffe6dc;
  --ok: #1f8a4c;
  --danger: #c4302b;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111014;
    --surface: #1a191e;
    --surface-2: #232228;
    --text: #f2f0ea;
    --muted: #9c98a3;
    --border: #2f2d35;
    --accent: #ff6a33;
    --accent-text: #160b06;
    --accent-soft: #3a1d12;
    --ok: #4cc47e;
    --danger: #ff6b63;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
a { color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.02em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; margin: 12vh auto; padding: 0 20px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: inline-flex; align-items: baseline; gap: 2px; font: 800 26px/1 var(--mono); text-decoration: none; }
.brand .dash { color: var(--accent); }
.brand small { font: 500 13px var(--sans); color: var(--muted); margin-left: 10px; }
.top nav { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.top nav .who { color: var(--muted); }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: 600 15px var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn svg { width: 18px; height: 18px; }

input[type="text"], input[type="url"] {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: 15px var(--mono);
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }

/* Landing */
.hero { padding: 7vh 0 5vh; }
.hero h1 { font-size: clamp(36px, 6.5vw, 64px); max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 0 0 4px; }

.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 56px; }
.option {
  display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: transform 0.15s, border-color 0.15s;
}
.option:hover { transform: translateY(-3px); border-color: var(--accent); }
.option .icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.option .icon svg { width: 22px; height: 22px; }
.option h2 { font-size: 21px; margin: 0; }
.option p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.example {
  font: 13px var(--mono); background: var(--surface-2); border-radius: 8px; padding: 10px 12px;
  overflow-wrap: anywhere;
}
.example b { color: var(--accent); font-weight: 600; }
.option .go { font-weight: 600; color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 32px 0 56px; border-top: 1px solid var(--border); }
.facts h3 { font-size: 16px; }
.facts p { margin: 0; color: var(--muted); font-size: 15px; }

footer { border-top: 1px solid var(--border); padding: 22px 0 40px; color: var(--muted); font-size: 14px; }

/* Dashboard */
.signin { text-align: center; padding: 10vh 0; }
.signin p { color: var(--muted); }
.meters { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 20px; }
.meter { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.meter b { font-family: var(--mono); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel h2 { font-size: 19px; }
.panel > p.lead { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

.form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.form.single { grid-template-columns: 1fr auto; }
.suffixed { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.suffixed:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.suffixed input { border: 0; background: transparent; outline: none; padding-right: 2px; }
.suffixed span { font: 15px var(--mono); color: var(--muted); padding-right: 12px; white-space: nowrap; }
.with-btn { display: flex; gap: 8px; }
.hint { font-size: 13px; margin-top: 6px; min-height: 1.3em; color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--danger); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
}
.item .main { flex: 1 1 260px; min-width: 0; }
.item .host { font: 600 15px var(--mono); overflow-wrap: anywhere; }
.item .host a { text-decoration: none; }
.item .host a:hover { text-decoration: underline; }
.item .sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.item .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.item details { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.item details summary { cursor: pointer; }
.item details ol { margin: 8px 0 0; padding-left: 20px; }
.empty { color: var(--muted); font-size: 15px; padding: 8px 0; }

.secret {
  margin: 14px 0 0; padding: 16px; border-radius: 12px; border: 1px dashed var(--accent);
  background: var(--accent-soft);
}
.secret p { margin: 0 0 10px; font-size: 14px; }
pre {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface);
  font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  font-size: 14px; box-shadow: 0 8px 30px rgb(0 0 0 / 0.2); max-width: calc(100vw - 32px);
}
.toast.bad { background: var(--danger); color: #fff; }

@media (max-width: 820px) {
  .options, .facts { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .brand small { display: none; }
}

.limit-note {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
