:root {
  color-scheme: dark;
  --ink: #f4ead6;
  --muted: #bfb29c;
  --gold: #d7a84e;
  --gold-bright: #f2cf79;
  --ember: #9e3f2e;
  --panel: rgba(17, 18, 20, 0.94);
  --line: rgba(225, 185, 102, 0.25);
  --danger: #ffb0a0;
  --success: #bde5aa;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #111;
}

button, input { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.75fr);
}

.brand-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 5vw, 5rem);
  background: linear-gradient(90deg, rgba(7, 9, 12, 0.18), rgba(7, 9, 12, 0.72)), url('/hero.jpg') center/cover no-repeat;
  isolation: isolate;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(7, 8, 10, 0.92), transparent 56%);
}

.brand-copy { max-width: 36rem; text-shadow: 0 2px 20px #000; }
.eyebrow, .kicker { color: var(--gold-bright); text-transform: uppercase; letter-spacing: .18em; font: 700 .75rem/1.3 Arial, sans-serif; }
.brand-copy h1 { margin: .25rem 0; color: var(--gold-bright); font-size: clamp(4rem, 9vw, 8rem); line-height: .9; font-style: italic; }
.brand-copy p { margin: 1rem 0 0; max-width: 32rem; font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.5; }

.account-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 4rem);
  background:
    radial-gradient(circle at 90% 5%, rgba(158, 63, 46, .24), transparent 28rem),
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 1px, transparent 1px 8px),
    #121315;
}

.account-card { width: min(100%, 34rem); }
.account-card header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.account-card h2 { margin: .2rem 0 0; font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 500; }
.account-card p { color: var(--muted); }
.crest { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-bright); background: #211913; transform: rotate(45deg); font-size: 1.8rem; font-weight: 700; }
.crest::first-letter { transform: rotate(-45deg); }

.tabs { display: grid; grid-template-columns: 1fr 1.45fr; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.tab { padding: .9rem .6rem; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-family: Arial, sans-serif; font-size: .95rem; }
.tab:hover, .tab:focus-visible { color: var(--ink); }
.tab.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

.form-stack { display: grid; gap: 1.15rem; }
.form-stack label { display: grid; gap: .45rem; font: 700 .95rem/1.3 Arial, sans-serif; color: #e7ddcc; }
.form-stack small, .form-intro { color: var(--muted); font-size: .82rem; font-weight: 400; line-height: 1.45; }
.form-stack input { width: 100%; min-height: 3rem; padding: .75rem .9rem; border: 1px solid #4d463a; border-radius: .2rem; background: rgba(5, 6, 7, .72); color: #fff; outline: none; }
.form-stack input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215, 168, 78, .12); }

.primary { min-height: 3.1rem; margin-top: .25rem; border: 1px solid #e2b961; border-radius: .2rem; color: #1a1309; background: linear-gradient(#f0cb78, #bd8735); font-weight: 800; cursor: pointer; }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { cursor: wait; filter: grayscale(.5); opacity: .7; }

.status { margin: 0 0 1.25rem; padding: .85rem 1rem; border-left: 3px solid var(--gold); background: rgba(215,168,78,.1); color: var(--ink); font: .93rem/1.45 Arial, sans-serif; }
.status.error { border-color: #d45e49; background: rgba(158,63,46,.15); color: var(--danger); }
.status.success { border-color: #7da867; background: rgba(100,150,82,.14); color: var(--success); }
.download-client { display: block; margin-top: 1.4rem; padding: .8rem 1rem; border: 1px solid var(--line); color: var(--gold-bright); text-align: center; text-decoration: none; font: 700 .9rem/1.4 Arial, sans-serif; }
.download-client:hover, .download-client:focus-visible { border-color: var(--gold); background: rgba(215,168,78,.08); }
.account-card footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: #8f8678; font: .78rem/1.5 Arial, sans-serif; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 36vh; align-items: flex-end; }
  .brand-copy h1 { font-size: clamp(3.8rem, 18vw, 6rem); }
  .account-panel { min-height: 64vh; }
}

@media (max-width: 520px) {
  .brand-panel { padding: 1.5rem; }
  .brand-copy p { font-size: 1rem; }
  .account-panel { padding: 2rem 1rem; }
  .tabs { grid-template-columns: 1fr; }
}
