:root {
  color-scheme: light dark;
  --bg: #f6f5f3;
  --fg: #1c1b19;
  --muted: #5c5a57;
  --line: rgba(0, 0, 0, 0.12);
  --link: #0b57d0;
  --ok: #1a7f37;
  --error: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --fg: #f2f0ec;
    --muted: #a9a6a1;
    --line: rgba(255, 255, 255, 0.12);
    --link: #8ab4ff;
    --ok: #5bb974;
    --error: #f2b8b5;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.075rem;
  line-height: 1.7;
  letter-spacing: 0.018em;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}
main {
  width: 100%;
  max-width: 38rem;
}
body:has(main.main--wide) {
  align-items: flex-start;
  padding-top: clamp(2rem, 6vw, 3.5rem);
}
main.main--wide {
  max-width: 46rem;
}
h1 {
  margin: 0 0 clamp(0.85rem, 3.5vw, 1.75rem);
  font-size: clamp(3.25rem, 12vw + 1.25rem, 10rem);
  text-align: right;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}
h1 .title-wildcard {
  color: var(--muted);
  opacity: 0.5;
  font-weight: 500;
}
h2,
.h2 {
  margin: 0 0 clamp(0.75rem, 3vw, 1.35rem);
  font-size: clamp(2.25rem, 8vw + 0.75rem, 6.5rem);
  text-align: right;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  color: var(--fg);
}
p {
  margin: 0 0 1em;
  color: var(--muted);
}
p:last-child {
  margin-bottom: 0;
}
.lede {
  color: var(--fg);
  font-size: 1.06em;
  line-height: 1.72;
  letter-spacing: 0.02em;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.75rem 0;
}
a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
footer {
  margin-top: 1.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  letter-spacing: 0.015em;
}

/* Reusable layout & form components */
.back-link {
  position: fixed;
  top: clamp(1.25rem, 4vw, 2.5rem);
  left: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9375rem;
  letter-spacing: 0.015em;
}
.back-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.stack > p {
  margin-bottom: 0;
}
.stack label {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0.015em;
  color: var(--muted);
}
.text-center {
  text-align: center;
}
.title {
  text-align: left;
  font-size: clamp(1.75rem, 4vw + 0.5rem, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--bg);
  overflow: hidden;
  font-size: clamp(1.2rem, 2.5vw + 0.75rem, 1.5rem);
  line-height: 1.35;
}
.input-suffix input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 1.1rem 1.15rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}
.input-suffix input:focus {
  outline: none;
}
.input-suffix:focus-within {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.input-suffix .suffix {
  flex-shrink: 0;
  padding: 1.1rem 1.15rem 1.1rem 0;
  color: var(--muted);
  font: inherit;
  line-height: inherit;
}
.status {
  margin: 0;
  min-height: 1.5em;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0.015em;
  color: var(--muted);
}
.status--success {
  color: var(--ok);
}
.status--error {
  color: var(--error);
}
.btn {
  display: block;
  margin: 0;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.4;
  cursor: pointer;
}
.w-100 {
  width: 100%;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: inherit;
  line-height: 1.5;
  letter-spacing: 0.015em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.btn-link:hover:not(:disabled) {
  text-decoration-thickness: 2px;
}
.btn-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Panels & navigation */
.card {
  --card-pad: clamp(1.25rem, 4vw, 1.75rem);
  width: 100%;
  padding: var(--card-pad);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg);
}
.card--sectioned {
  padding: 0;
  overflow: hidden;
}
.card__section {
  padding: var(--card-pad);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.toolbar a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
}
.toolbar a:hover {
  text-decoration: underline;
}
.toolbar h1,
.toolbar h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
h1.title {
  text-align: left;
}
.font-mono {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}
.muted {
  color: var(--muted);
}
.site-host {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw + 0.5rem, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
}
.site-label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.015em;
}
.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  overflow: hidden;
}
.nav-list--in-card {
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.015em;
}
.nav-list--in-card .nav-item {
  padding-left: var(--card-pad);
  padding-right: var(--card-pad);
}
.nav-list > li:first-child .nav-item {
  border-top: 0;
}
.nav-item:hover {
  background: color-mix(in srgb, var(--fg) 4%, transparent);
}
.nav-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
}
.nav-item__icon svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}
.nav-item__label {
  flex: 1;
  min-width: 0;
}
.nav-item__chevron {
  flex-shrink: 0;
  color: var(--muted);
}
.nav-item__chevron svg {
  display: block;
  width: 0.65rem;
  height: 0.65rem;
}
.nav-item--disabled {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}
.nav-item--disabled:hover {
  background: transparent;
}
.help-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.65;
  letter-spacing: 0.015em;
  color: var(--muted);
}
.help-footer p {
  margin: 0 0 0.35rem;
  color: inherit;
}
.help-footer a {
  color: var(--fg);
}
.status--ok {
  color: var(--ok);
}

/* Feature rows */
.feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.25rem) clamp(1.1rem, 3vw, 1.35rem);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg);
}
.feature-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  color: var(--muted);
}
.feature-card__icon svg {
  display: block;
  width: 1.875rem;
  height: 1.875rem;
}
.feature-card__body {
  flex: 1;
  min-width: 0;
}
.feature-card__title {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  letter-spacing: 0.015em;
  color: var(--fg);
}
.feature-card__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  letter-spacing: 0.015em;
}
.feature-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.feature-card__action {
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.015em;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.feature-card__action:hover {
  text-decoration-thickness: 2px;
}
.feature-card__action--disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

/* Form fields in stacks */
.stack input[type="url"],
.stack input[type="email"],
.stack input[type="text"] {
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  letter-spacing: 0.015em;
  line-height: 1.4;
}
.stack input[type="url"]:focus,
.stack input[type="email"]:focus,
.stack input[type="text"]:focus {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
