:root {
  color-scheme: light;
  --ink: #15211c;
  --muted: #607068;
  --line: #dfe7e2;
  --paper: #f5f7f3;
  --white: #fff;
  --green: #166b4a;
  --green-dark: #0d4f36;
  --green-soft: #e4f2ea;
  --amber: #d28a24;
  --red: #a9433c;
  --shadow: 0 18px 50px rgba(30, 57, 44, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-header {
  height: 72px; max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.account-chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.hero { min-height: 520px; padding: 76px 0 64px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 72px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; max-width: 750px; font-size: clamp(46px, 6.1vw, 78px); line-height: 1.02; letter-spacing: -.055em; font-weight: 780; }
h1 span { color: var(--green); }
.hero-description { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.domain-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.domain-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.62); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.steps > li > span { color: var(--green); font: 700 12px ui-monospace, monospace; }
.steps strong, .steps small { display: block; }
.steps small { margin-top: 5px; color: var(--muted); line-height: 1.4; }

.section-heading { margin-bottom: 30px; }
h2 { margin-bottom: 10px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.access-section, .dashboard { padding-top: 46px; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel, .records-panel { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.panel-heading h3, .records-heading h3 { margin: 2px 0 5px; font-size: 20px; letter-spacing: -.02em; }
.panel-heading p, .records-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.panel-number { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 800; }
label { display: grid; gap: 8px; margin-bottom: 18px; color: #3e4d46; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fbfcfa; border: 1px solid #cad6cf; border-radius: 10px; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,107,74,.11); }
input:disabled, select:disabled { background: #edf0ed; color: #7a857f; cursor: not-allowed; }

.button { min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: var(--ink); color: white; }
.button-quiet { color: var(--ink); border-color: var(--line); background: transparent; }
.button-small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button-light { background: white; color: var(--green-dark); }

.key-reveal { margin: 42px 0; padding: 36px; border-radius: 22px; background: var(--green-dark); color: white; box-shadow: var(--shadow); }
.key-reveal .eyebrow { color: #96dbb8; }
.key-reveal h2 { font-size: 34px; }
.key-reveal p { color: #c4d8cd; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 28px 0 18px; }
.key-row code { min-width: 0; overflow: auto; padding: 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(255,255,255,.08); color: white; white-space: nowrap; }
.acknowledge { grid-template-columns: auto 1fr; justify-content: start; align-items: center; margin: 0 0 18px; color: #e6f0eb; }
.acknowledge input { width: 18px; min-height: 18px; }

.dashboard-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.dashboard-heading h2 { margin-bottom: 6px; }
.muted { margin: 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(370px, .78fr) minmax(470px, 1.22fr); gap: 22px; align-items: start; }
.fqdn-fields { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 9px; align-items: center; }
.fqdn-fields > span { margin-top: 8px; color: var(--muted); font-weight: 800; }
.availability { min-height: 20px; margin: -8px 0 18px; color: var(--muted); font-size: 13px; }
.availability.available { color: var(--green); }
.availability.unavailable { color: var(--red); }
.record-fields { display: grid; grid-template-columns: .8fr 1.3fr .65fr; gap: 10px; }
.field-help { margin: -9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-actions { display: flex; gap: 10px; }

.records-panel { min-height: 360px; }
.records-heading { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.icon-button { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 19px; }
.records-list { display: grid; }
.record { padding: 20px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.record-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.record-name strong { overflow-wrap: anywhere; font: 700 15px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status { flex: none; padding: 4px 8px; border-radius: 999px; background: #edf1ee; color: var(--muted); font-size: 11px; font-weight: 800; }
.status.active { background: var(--green-soft); color: var(--green); }
.status.error, .status.drifted { background: #f9e8e5; color: var(--red); }
.status.pending { background: #fff0d9; color: #966117; }
.record-target { margin: 10px 0; color: var(--muted); font: 12px ui-monospace, monospace; overflow-wrap: anywhere; }
.record-error { margin: 8px 0; color: var(--red); font-size: 12px; }
.record-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.record-meta small { color: #7b8881; }
.record-actions { display: flex; gap: 6px; }
.record-actions button { padding: 5px 8px; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 700; }
.record-actions .danger { color: var(--red); }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 7px; color: var(--ink); }

footer { max-width: 1180px; margin: 0 auto; padding: 26px 24px 38px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
footer p { margin: 0; }
footer a { color: var(--green); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 5; max-width: min(390px, calc(100vw - 44px)); padding: 13px 16px; border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 13px; }
.toast.error { background: var(--red); }

@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 42px; padding-top: 56px; }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); }
  .steps li { display: block; padding-right: 16px; border-right: 1px solid var(--line); }
  .steps li:last-child { border-right: 0; }
  .steps div { margin-top: 12px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header, main { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 42px 0 38px; }
  h1 { font-size: 44px; }
  .hero-description { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; border-right: 0; }
  .steps div { margin-top: 0; }
  .access-grid { grid-template-columns: 1fr; }
  .panel, .records-panel { padding: 21px; border-radius: 16px; }
  .dashboard-heading { align-items: flex-start; gap: 20px; }
  .account-chip { display: none; }
  .fqdn-fields { grid-template-columns: 1fr auto 1.15fr; }
  .record-fields { grid-template-columns: 1fr 1fr; }
  .target-field { grid-column: 1 / -1; grid-row: 2; }
  .key-reveal { padding: 25px 20px; }
  .key-row { grid-template-columns: 1fr; }
  footer { margin: 0 16px; padding-left: 0; padding-right: 0; flex-direction: column; }
}
