:root {
  --ink: #19201d;
  --muted: #6e7671;
  --line: #dde2dc;
  --paper: #f5f5f0;
  --card: #ffffff;
  --green: #225f4c;
  --green-dark: #174636;
  --green-soft: #e8f2ed;
  --lime: #d8f078;
  --danger: #9e3f3f;
  --danger-soft: #faecea;
  --shadow: 0 14px 38px rgba(25, 32, 29, .07);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  height: 72px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 16px; letter-spacing: -.02em; }
.brand b { color: var(--green); }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px 9px 9px 2px; color: #fff; background: var(--green); font-family: Georgia, serif; font-weight: 700; font-size: 20px; }
.brand-mark.large { width: 50px; height: 50px; font-size: 27px; border-radius: 13px 13px 13px 3px; }

.account { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.account form { margin: 0; }
.account button { border: 0; background: transparent; color: var(--ink); font-weight: 650; padding: 8px 0 8px 16px; border-left: 1px solid var(--line); }
.account button:hover { color: var(--green); }

.dashboard { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 34px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
.hero-row h1 { margin: 2px 0 8px; font: 500 clamp(38px, 5vw, 62px)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.hero-row > div > p:last-child { margin: 0; max-width: 570px; color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0 0 6px; color: var(--green); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; }

.stats { display: flex; min-width: 330px; border-top: 1px solid var(--ink); }
.stats article { flex: 1; padding: 14px 22px 0 0; }
.stats article + article { padding-left: 22px; border-left: 1px solid var(--line); }
.stats span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.stats strong { font: 500 33px/1.15 Georgia, serif; }
.stats small { color: #9ca39f; font-size: 17px; }

.create-card, .links-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.create-card { padding: 26px 28px 29px; margin-bottom: 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-heading h2 { margin: 0; font: 500 25px/1.15 Georgia, serif; letter-spacing: -.02em; }
.domain-chip { padding: 7px 11px; border-radius: 99px; background: var(--green-soft); color: var(--green); font: 600 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }

.create-form { display: grid; grid-template-columns: minmax(280px, 2.2fr) minmax(150px, .85fr) minmax(180px, 1fr) auto; align-items: end; gap: 13px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; color: #3e4843; }
label > span { color: #9aa09c; font-weight: 500; float: right; }
input { width: 100%; height: 46px; border: 1px solid #ccd2cc; border-radius: 10px; padding: 0 13px; outline: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #a5aaa6; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34, 95, 76, .12); }
.slug-input { display: flex; align-items: center; height: 46px; border: 1px solid #ccd2cc; border-radius: 10px; background: #fff; overflow: hidden; }
.slug-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34, 95, 76, .12); }
.slug-input b { padding-left: 13px; color: #a2a8a3; }
.slug-input input { border: 0; box-shadow: none; padding-left: 5px; }
.button { height: 46px; border: 0; border-radius: 10px; padding: 0 19px; font-weight: 750; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { color: #fff; background: var(--green); box-shadow: 0 6px 15px rgba(34,95,76,.16); }
.button.primary:hover { background: var(--green-dark); }
.create-button { white-space: nowrap; }

.links-card { overflow: hidden; }
.table-heading { align-items: end; margin: 0; padding: 25px 28px 18px; }
.table-heading > p { margin: 0; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 920px; border-collapse: collapse; }
th { padding: 12px 18px; color: #858d88; background: #fafbf8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; text-transform: uppercase; letter-spacing: .09em; font-size: 10px; }
th:first-child, td:first-child { padding-left: 28px; }
th:last-child, td:last-child { padding-right: 28px; }
td { padding: 17px 18px; border-bottom: 1px solid #ecefeb; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfa; }
.link-cell { width: 34%; max-width: 360px; }
.link-line { display: flex; align-items: center; gap: 8px; }
.short-link { color: var(--green); font: 700 14px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
.short-link:hover { text-decoration: underline; }
.destination { display: block; color: var(--muted); font-size: 12px; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 5px; }
.copy-button { padding: 3px 7px; color: #78817b; background: #f1f3ef; border: 0; border-radius: 6px; font-size: 10px; font-weight: 700; }
.copy-button:hover { color: var(--green); background: var(--green-soft); }
.label-text, .date-cell { color: #646c67; font-size: 12px; }
.number-cell strong, .number-cell span { display: block; }
.number-cell strong { font-size: 16px; }
.number-cell span { color: #969c98; font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.status i { width: 6px; height: 6px; border-radius: 50%; }
.status.live { color: var(--green); background: var(--green-soft); }
.status.live i { background: #36a274; box-shadow: 0 0 0 3px rgba(54,162,116,.13); }
.status.off { color: #747a76; background: #eceeeb; }
.status.off i { background: #949a96; }
.action-cell { text-align: right; }
.toggle { position: relative; width: 39px; height: 22px; padding: 0; border: 0; border-radius: 99px; background: #cbd0cc; transition: background .18s; }
.toggle span { position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .18s; }
.toggle.is-on { background: var(--green); }
.toggle.is-on span { transform: translateX(17px); }
.toggle:focus-visible { outline: 3px solid rgba(34,95,76,.25); outline-offset: 2px; }
.empty { padding: 50px !important; text-align: center; color: var(--muted); }
.empty strong, .empty span { display: block; }
.empty strong { color: var(--ink); margin-bottom: 5px; }

.notice { padding: 12px 14px; margin: 0 0 18px; border-radius: 10px; font-size: 13px; }
.notice.error { color: var(--danger); background: var(--danger-soft); border: 1px solid #efcfcb; }
.notice.success { color: var(--green); background: var(--green-soft); border: 1px solid #cbe0d5; }
footer { padding: 27px 0 0; text-align: center; color: #999f9b; font-size: 11px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: #edece5; }
.login-shell { display: grid; grid-template-columns: minmax(320px, 460px) minmax(320px, 460px); width: min(920px, 100%); min-height: 610px; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 24px 75px rgba(26,34,30,.14); }
.login-card { padding: 45px 52px; display: flex; flex-direction: column; }
.login-copy { margin: auto 0 29px; }
.login-copy h1 { margin: 4px 0 11px; font: 500 47px/1 Georgia, serif; letter-spacing: -.04em; }
.login-copy > p:last-child { color: var(--muted); margin: 0; max-width: 330px; }
.stack { display: grid; gap: 16px; }
.stack .button { margin-top: 5px; }
.login-aside { color: #fff; background: var(--green); padding: 48px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside::before { content: ""; position: absolute; width: 380px; height: 380px; right: -180px; top: -150px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025); }
.aside-kicker { position: relative; margin: 0; color: var(--lime); font: 650 12px ui-monospace, monospace; }
blockquote { position: relative; margin: auto 0; max-width: 330px; font: 500 39px/1.12 Georgia, serif; letter-spacing: -.035em; }
.feature-list { position: relative; display: grid; gap: 10px; color: #d8e6df; font-size: 12px; }
.feature-list span { display: flex; align-items: center; gap: 9px; }
.feature-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }

.missing-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--paper); }
.missing-card { width: min(590px, 100%); padding: 58px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.missing-card .eyebrow { margin-top: 24px; }
.missing-card h1 { margin: 8px 0 14px; font: 500 38px/1.08 Georgia, serif; letter-spacing: -.035em; }
.missing-card > p:not(.eyebrow) { color: var(--muted); }
.missing-card code { display: inline-block; margin-top: 12px; padding: 6px 10px; color: var(--green); background: var(--green-soft); border-radius: 7px; }

@media (max-width: 980px) {
  .create-form { grid-template-columns: 1fr 1fr; }
  .destination-field { grid-column: 1 / -1; }
  .hero-row { align-items: flex-start; }
  .login-shell { grid-template-columns: 1fr; width: min(520px, 100%); }
  .login-aside { display: none; }
}

@media (max-width: 700px) {
  .topbar { padding: 0 20px; }
  .account > span { display: none; }
  .dashboard { width: min(100% - 28px, 1180px); padding-top: 36px; }
  .hero-row { display: block; }
  .stats { min-width: 0; margin-top: 28px; }
  .create-card { padding: 22px 18px; }
  .create-form { grid-template-columns: 1fr; }
  .destination-field { grid-column: auto; }
  .section-heading { display: block; }
  .domain-chip { display: inline-block; margin-top: 11px; }
  .table-heading { padding: 22px 18px 16px; }
  .table-heading > p { margin-top: 7px; }
  .login-page { padding: 14px; }
  .login-shell { min-height: calc(100vh - 28px); }
  .login-card { padding: 32px 24px; }
  .login-copy { margin-top: auto; }
  .missing-card { padding: 40px 23px; }
  .missing-card h1 { font-size: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
