:root {
  --paper: #f5efe4;
  --paper-soft: #fbf7ef;
  --paper-deep: #e9e1d3;
  --ink: #1a2039;
  --muted: #686778;
  --accent: #f9a3c0;
  --accent-ink: #1a2039;
  --dark: #141a2f;
  --dark-soft: #1e2744;
  --dark-ink: #f7f1e7;
  --dark-muted: #b9b9c7;
  --field: #eee6d8;
  --field-focus: #e4d8c6;
  --line: #d8cfc0;
  --line-dark: rgba(247, 241, 231, 0.2);
  --success: #27614d;
  --error: #9d3546;
  --pad: clamp(20px, 4.2vw, 64px);
  --max: 1320px;
  --display: "Zilla Slab", "Iowan Old Style", Georgia, serif;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand-name {
  font-weight: 750;
}

.brand-slash {
  color: var(--muted);
  font-weight: 400;
}

.brand-page {
  color: var(--muted);
  font-weight: 500;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  font-size: 13px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.topnav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.topnav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(46px, 8vh, 92px) 0 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(58px, 8.6vw, 116px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.hero h1 em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.08em;
}

.hero-aside {
  max-width: 38ch;
  padding-bottom: 0.45em;
}

.hero-aside p {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
}

.route-line {
  margin-top: 22px !important;
}

.route-chip {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  letter-spacing: -0.02em;
}

.shortener {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(18px, 2.5vw, 30px);
  align-items: stretch;
  margin-top: clamp(40px, 6vh, 72px);
}

.form-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: clamp(24px, 3vw, 34px);
}

.panel-number {
  color: var(--muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.shorten-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: #8a857b;
}

.field input:hover {
  background: var(--field-focus);
}

.field input:focus {
  border-color: var(--ink);
  background: var(--paper-soft);
  box-shadow: 0 0 0 3px rgba(249, 163, 192, 0.42);
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 2px;
  padding: 14px 20px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-ink);
}

.submit-button:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-status.is-error {
  color: var(--error);
}

.form-status.is-success {
  color: var(--success);
}

.result-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(24px, 3vw, 42px);
  background: var(--dark);
  color: var(--dark-ink);
}

.result-heading {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.result-heading .panel-number {
  color: var(--dark-muted);
}

.result-heading h2 {
  color: var(--dark-ink);
}

.result-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  min-height: 240px;
  color: var(--dark-muted);
}

.result-empty p {
  margin: 0;
  max-width: 22ch;
  font-size: 15px;
  line-height: 1.5;
}

.result-empty-mark {
  color: var(--accent);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.result-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.result-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.short-url {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--dark-ink);
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-decoration: none;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.short-url:hover {
  color: var(--accent);
}

.result-destination {
  max-width: 34ch;
  margin: 18px 0 0;
  overflow-wrap: anywhere;
  color: var(--dark-muted);
  font-size: 12px;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.copy-button,
.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--dark-ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.copy-button:hover,
.open-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.copy-button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.copy-button:hover {
  background: var(--dark-ink);
  border-color: var(--dark-ink);
}

.result-footnote {
  max-width: 38ch;
  margin: auto 0 0;
  padding-top: 34px;
  border-top: 1px solid var(--line-dark);
  color: var(--dark-muted);
  font-size: 11px;
  line-height: 1.5;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 6vh, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.trust-row p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.trust-row strong {
  color: var(--ink);
}

.footer {
  margin-top: clamp(80px, 12vh, 140px);
  padding: clamp(28px, 4vw, 48px) 0;
  background: var(--dark);
  color: var(--dark-ink);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer-mark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.footer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 38ch;
  color: var(--dark-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.footer-side p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.footer-nav a {
  color: var(--dark-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    align-items: start;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-aside {
    max-width: 48ch;
  }

  .shortener {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-card {
    min-height: 0;
  }

  .result-empty {
    min-height: 180px;
  }
}

@media (max-width: 620px) {
  .topbar {
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 0 8px;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    font-size: clamp(50px, 15vw, 68px);
  }

  .hero-aside p {
    font-size: 16px;
  }

  .shortener {
    margin-top: 36px;
  }

  .form-card,
  .result-card {
    padding: 22px 18px;
  }

  .trust-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-side {
    align-items: flex-start;
    text-align: left;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .result-actions {
    margin-top: 24px;
  }

  .result-footnote {
    padding-top: 24px;
  }
}
