:root {
  --bg: #f4f7f6;
  --ink: #10211f;
  --muted: #5b6b67;
  --line: #d7e1de;
  --surface: #ffffff;
  --eoc-green: #00a884;
  --eoc-teal: #0c6d72;
  --eoc-lime: #b6d63f;
  --danger: #b42318;
  --shadow: 0 28px 80px rgba(14, 39, 36, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(182, 214, 63, 0.26), transparent 34rem),
    linear-gradient(135deg, #f9fbfa 0%, var(--bg) 45%, #e8f2ef 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.hero {
  width: 100%;
}

.brand {
  margin-bottom: 56px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  display: block;
  width: 187px;
  height: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  gap: 64px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--eoc-teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.shortener {
  padding: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.field-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--ink);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 62px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--eoc-green);
  box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.14);
}

button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--eoc-teal), var(--eoc-green));
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.input-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 142px;
  padding: 0 22px;
}

.input-row svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.advanced {
  margin-top: 16px;
  color: var(--muted);
}

.advanced summary {
  width: max-content;
  cursor: pointer;
  font-weight: 700;
}

.alias-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.alias-row span {
  padding: 0 14px;
  color: var(--muted);
  white-space: nowrap;
}

.alias-row input {
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  min-height: 52px;
  box-shadow: none;
}

.password-field {
  margin-top: 16px;
}

.password-field input[type="password"] {
  min-height: 52px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.remember-row input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--eoc-green);
}

.form-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(0, 168, 132, 0.22);
  border-radius: 8px;
  background: rgba(0, 168, 132, 0.08);
}

.result[hidden] {
  display: none;
}

.result-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--eoc-teal);
  font-weight: 800;
  text-decoration: none;
}

.copy-button {
  min-height: 44px;
  padding: 0 18px;
}

.qr-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 168, 132, 0.18);
}

.qr-code {
  width: 132px;
  height: 132px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--eoc-teal);
  background: #fff;
  border: 1px solid rgba(12, 109, 114, 0.24);
}

.message {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.message[data-tone="success"] {
  color: var(--eoc-teal);
}

.message[data-tone="error"] {
  color: var(--danger);
}

.site-footer {
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  text-align: center;
}

.site-footer strong {
  color: var(--eoc-teal);
}

@media (max-width: 860px) {
  .shell {
    align-items: start;
    padding-top: 24px;
  }

  .brand {
    margin-bottom: 42px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 5rem);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .brand-link {
    gap: 12px;
  }

  .brand img {
    width: 148px;
  }

  .shortener {
    padding: 18px;
  }

  .input-row,
  .result {
    grid-template-columns: 1fr;
  }

  .input-row input {
    min-height: 58px;
  }

  .input-row button {
    min-height: 54px;
    width: 100%;
  }

  .alias-row {
    grid-template-columns: 1fr;
  }

  .alias-row span {
    padding: 12px 14px 0;
  }

  .alias-row input {
    border-left: 0;
  }

  .copy-button {
    width: 100%;
  }

  .qr-panel {
    grid-template-columns: 1fr;
  }

  .qr-code {
    width: min(100%, 180px);
    height: auto;
    aspect-ratio: 1;
  }

  .qr-actions,
  .secondary-button {
    width: 100%;
  }

  .site-footer {
    margin-top: 52px;
    padding-bottom: 28px;
  }
}
