:root {
  color: #102a35;
  background: #edf2f0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #102a35;
  --muted: #5e6d70;
  --teal: #0c7778;
  --teal-deep: #075d60;
  --cream: #fbfaf5;
  --line: #d8dfda;
  --error: #a13f36;
  --success: #197054;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; }

button, input { font: inherit; }

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

.site-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, .86fr) minmax(520px, 1.14fr); }

.story-panel {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(2rem, 4.5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #f4f7f4;
  background: #102d36;
}

.story-panel::before,
.story-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
}

.story-panel::before { width: 38rem; height: 38rem; top: -20rem; right: -18rem; background: rgba(29, 137, 132, .25); }
.story-panel::after { width: 26rem; height: 26rem; bottom: -14rem; left: -12rem; background: rgba(197, 157, 86, .13); }

.brand { display: inline-flex; align-items: center; gap: .8rem; width: fit-content; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; letter-spacing: .01em; }
.brand small { margin-top: .35rem; font-size: .64rem; font-weight: 800; letter-spacing: .3em; }
.brand-mark { width: 2.65rem; height: 2.65rem; display: flex; align-items: end; justify-content: center; gap: .16rem; padding: .55rem; border: 1px solid rgba(255,255,255,.45); border-radius: .7rem .7rem 1.15rem 1.15rem; }
.brand-mark i { display: block; width: .28rem; background: #6bc0b5; border-radius: 1rem 1rem 0 0; transform-origin: bottom; }
.brand-mark i:nth-child(1) { height: .75rem; transform: rotate(-22deg); }
.brand-mark i:nth-child(2) { height: 1.25rem; background: #e6c87e; }
.brand-mark i:nth-child(3) { height: .9rem; transform: rotate(22deg); }

.story-copy { max-width: 36rem; margin: 5rem 0 3rem; }
.eyebrow { margin: 0 0 1.25rem; color: #72d3cc; font-size: .72rem; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.story-line { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 6vw, 5.8rem); font-weight: 400; letter-spacing: -.045em; line-height: .94; }
.story-detail { max-width: 30rem; margin: 2rem 0 0; color: #c6d4d2; font-size: 1rem; line-height: 1.7; }
.story-foot { margin: 0; color: #8fa8a8; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.account-panel { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(1.5rem, 6vw, 6rem); background: radial-gradient(circle at 80% 10%, rgba(80,159,151,.13), transparent 27rem), #eef3f1; }
.account-card { width: min(100%, 35rem); padding: clamp(1.7rem, 4vw, 3.2rem); border: 1px solid rgba(20, 66, 69, .14); border-radius: 1.25rem; background: rgba(255,255,252,.94); box-shadow: 0 1.5rem 4rem rgba(25,54,58,.11); }
.account-card h1 { margin: .15rem 0 .85rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 5vw, 3.45rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.03; }
.account-card h2 { margin: 2rem 0 .4rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.intro { margin: 0 0 1.8rem; color: var(--muted); line-height: 1.6; }
.secure-note { display: flex; gap: .75rem; margin: 1.5rem 0; padding: 1rem; color: #34595b; background: #edf7f4; border-left: 3px solid #23948d; border-radius: .25rem .7rem .7rem .25rem; line-height: 1.5; }
.secure-note::before { content: "✓"; flex: 0 0 auto; width: 1.35rem; height: 1.35rem; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: .72rem; font-weight: 900; }

.account-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .5rem; }
.field label, .field-label { color: #29464d; font-size: .78rem; font-weight: 800; letter-spacing: .035em; }
.field input { width: 100%; min-height: 3.2rem; padding: .75rem .9rem; color: var(--ink); background: #fff; border: 1px solid #c7d1ce; border-radius: .65rem; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,119,120,.15); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field small { color: var(--muted); line-height: 1.45; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem !important; font-weight: 750 !important; letter-spacing: .28em; }
.password-row { position: relative; }
.password-row input { padding-right: 5rem; }
.password-row button { position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); padding: .45rem .55rem; border: 0; color: var(--teal-deep); background: transparent; font-size: .75rem; font-weight: 800; cursor: pointer; }

.primary-button, .secondary-button { min-height: 3.2rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1rem; border-radius: .65rem; font-weight: 800; cursor: pointer; transition: transform .14s ease, background .14s ease, opacity .14s ease; }
.primary-button { border: 1px solid var(--teal-deep); color: white; background: var(--teal-deep); }
.primary-button:hover { background: #064b4e; }
.secondary-button { border: 1px solid #b9cbc6; color: var(--teal-deep); background: transparent; }
.secondary-button:hover { background: #edf7f4; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:disabled, .secondary-button:disabled { cursor: wait; opacity: .62; }
.button-stack { display: grid; gap: .7rem; margin-top: .35rem; }
.text-link { color: var(--teal-deep); font-weight: 750; text-underline-offset: .18em; }
.footer-link { margin: 1.4rem 0 0; text-align: center; color: var(--muted); font-size: .88rem; }
.status { min-height: 1.5rem; margin: 0; font-size: .9rem; line-height: 1.45; }
.status.error { color: var(--error); }
.status.success { color: var(--success); }
.identity { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #f8faf8; }
.identity-mark { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; color: var(--teal-deep); background: #dff1ec; border-radius: 50%; font-weight: 800; }
.identity span { display: grid; gap: .14rem; min-width: 0; }
.identity strong, .identity small { overflow: hidden; text-overflow: ellipsis; }
.identity small { color: var(--muted); }
.step { color: var(--teal); font-size: .7rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.divider { height: 1px; margin: 1.5rem 0; background: var(--line); }
.support-note { width: min(100%, 35rem); margin: 1.1rem 0 0; color: #647376; font-size: .76rem; line-height: 1.5; text-align: center; }
.loading { min-height: 15rem; display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--muted); }
.spinner { width: 1.2rem; height: 1.2rem; border: 2px solid #b8ccc7; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .site-shell { display: block; }
  .story-panel { min-height: auto; padding: 1.35rem 1.4rem; }
  .story-copy { margin: 3.5rem 0 2rem; }
  .story-line { font-size: clamp(2.7rem, 12vw, 4.4rem); }
  .story-detail { max-width: 38rem; }
  .story-foot { display: none; }
  .account-panel { min-height: auto; padding: 1.2rem; }
  .account-card { margin-top: -1.5rem; }
}

@media (max-width: 480px) {
  .story-copy { margin: 2.8rem 0 2.3rem; }
  .story-line { font-size: 2.9rem; }
  .account-card { padding: 1.45rem; border-radius: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
