@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme:light;
  --ink:#17151a;
  --muted:#68717d;
  --paper:#eef1f5;
  --surface:#fff;
  --line:#d9dee6;
  --line-strong:#b7c0cc;
  --accent:#ed416d;
  --accent-soft:#fff0f4;
  --focus:#ed416d33;
}

* { box-sizing:border-box; }
html { min-width:320px; }
body {
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 12%,#fff 0,transparent 30%),
    radial-gradient(circle at 88% 82%,#eeeaff 0,transparent 32%),
    var(--paper);
  color:var(--ink);
  font:16px/1.5 'Space Grotesk',Arial,sans-serif;
}

.auth-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:76px;
  padding:18px clamp(22px,5vw,72px);
}

.brand {
  color:var(--ink);
  text-decoration:none;
  font-size:21px;
  font-weight:700;
  letter-spacing:-1.5px;
}
.brand span { color:var(--accent); margin-left:2px; }
.auth-header nav { display:flex; align-items:center; gap:14px; }
.auth-header nav a {
  border:1px solid var(--line-strong);
  border-radius:3px;
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  padding:9px 15px;
  text-decoration:none;
  transition:background .15s,border-color .15s,transform .15s;
}
.auth-header nav a:hover { background:#fff; border-color:#929dab; transform:translateY(-1px); }

.auth-shell {
  width:min(500px,calc(100% - 32px));
  margin:clamp(26px,7vh,74px) auto 70px;
  padding:clamp(28px,6vw,48px);
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  border:1px solid #fff;
  border-radius:4px;
  box-shadow:0 26px 80px #26324412,0 2px 8px #2632440d;
  backdrop-filter:blur(12px);
}

.eyebrow {
  margin:0 0 14px;
  color:var(--accent);
  font:500 11px 'DM Mono',monospace;
  letter-spacing:.1em;
}
h1 {
  margin:0 0 12px;
  font-size:clamp(38px,8vw,58px);
  line-height:.96;
  letter-spacing:-.06em;
}
.intro { margin:0 0 34px; color:var(--muted); font-size:16px; }
form { display:grid; gap:18px; }
label { display:grid; gap:8px; color:#302d34; font-size:13px; font-weight:600; }
input {
  width:100%;
  min-height:50px;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:3px;
  background:#f9fafc;
  color:var(--ink);
  font:500 16px 'Space Grotesk',Arial,sans-serif;
  outline:0;
  transition:background .15s,border-color .15s,box-shadow .15s;
}
input:hover { border-color:var(--line-strong); }
input:focus { background:#fff; border-color:var(--accent); box-shadow:0 0 0 4px var(--focus); }
.consent { display:flex; align-items:flex-start; gap:10px; font-size:13px; font-weight:400; line-height:1.45; }
.consent input { flex:0 0 18px; width:18px; min-height:18px; height:18px; margin:1px 0 0; padding:0; accent-color:var(--accent); }
.consent span { display:block; flex:1; min-width:0; }
.consent a { color:var(--ink); font-weight:600; text-underline-offset:2px; }
button {
  min-height:52px;
  margin-top:4px;
  padding:14px 20px;
  border:0;
  border-radius:3px;
  background:var(--ink);
  box-shadow:0 8px 20px #17151a1f;
  color:#fff;
  font:700 15px 'Space Grotesk',Arial,sans-serif;
  cursor:pointer;
  transition:background .15s,box-shadow .15s,transform .15s;
}
button::after { content:'→'; float:right; color:#ff8cab; font-size:18px; line-height:1; }
button:hover { background:#2c2830; box-shadow:0 11px 24px #17151a29; transform:translateY(-1px); }
button:active { transform:translateY(0); }
.message {
  margin:0 0 24px;
  padding:13px 15px;
  border:1px solid #e6a7b5;
  border-radius:3px;
  background:var(--accent-soft);
  color:#7e203a;
  font-size:14px;
}
.message > div + div { margin-top:5px; }
.success { border-color:#94c7a5; background:#edf8f0; color:#275c38; }
.form-link { align-self:flex-end; color:#555f6d; font-size:13px; font-weight:600; margin-top:-9px; text-decoration:underline; text-underline-offset:3px; }
.secondary { margin:25px 0 0; color:var(--muted); font-size:14px; text-align:center; }
.secondary a { color:var(--ink); font-weight:700; text-underline-offset:3px; }
.account { margin:4px 0 0; padding:24px; border:1px solid var(--line); border-radius:3px; background:#f9fafc; }
.account dt { color:var(--muted); font:11px 'DM Mono',monospace; letter-spacing:.04em; text-transform:uppercase; }
.account dd { margin:4px 0 20px; font-weight:600; }
.account dd:last-child { margin-bottom:0; }
.plan-summary { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:28px 0 14px; padding:20px; border:1px solid var(--line); background:#f9fafc; }
.plan-summary div { display:grid; gap:3px; }
.plan-summary .plan-label,.section-label { color:var(--muted); font:500 10px 'DM Mono',monospace; letter-spacing:.09em; }
.plan-summary strong { font-size:21px; }
.plan-summary a { color:var(--ink); font-size:13px; font-weight:700; text-underline-offset:3px; }
.usage-summary { margin-bottom:34px; padding:20px; border:1px solid var(--line); background:#fff; }
.usage-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; }
.usage-heading div { display:grid; gap:3px; }
.usage-heading span,.usage-heading small { color:var(--muted); font-size:12px; }
.usage-heading strong { font-size:19px; }
.usage-track { height:7px; margin-top:15px; overflow:hidden; background:#e4e8ed; }
.usage-track span { display:block; height:100%; background:var(--accent); }
.tools { margin:0 0 34px; }
.section-label { margin:0 0 10px; }
.tool-card { display:flex; align-items:end; justify-content:space-between; gap:20px; padding:22px; border:1px solid var(--ink); background:var(--ink); color:#fff; text-decoration:none; transition:transform .15s,box-shadow .15s; }
.tool-card:hover { transform:translateY(-2px); box-shadow:0 12px 30px #17151a20; }
.tool-card span { color:#ff8cab; font:500 10px 'DM Mono',monospace; letter-spacing:.1em; }
.tool-card h2 { margin:7px 0 5px; font-size:19px; letter-spacing:-.03em; }
.tool-card p { margin:0; color:#bfc2c8; font-size:13px; }
.tool-card b { flex:none; color:#ff8cab; font:500 11px 'DM Mono',monospace; }
.tool-card.locked { border-color:#c7ccd3; background:#e5e8ed; color:#646b75; cursor:not-allowed; }
.tool-card.locked span,.tool-card.locked b { color:#8a5262; }
.tool-card.locked p { color:#737b86; }
.inline-form { margin-top:22px; }
.email-status { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px; margin:28px 0 14px; padding:20px; border:1px solid var(--line); background:#fff; }
.email-status > div { display:grid; min-width:0; gap:4px; }
.email-status .plan-label { color:var(--muted); font:500 10px 'DM Mono',monospace; letter-spacing:.09em; }
.email-status strong { overflow-wrap:anywhere; font-size:15px; }
.email-status small { max-width:500px; color:var(--muted); font-size:12px; line-height:1.5; }
.email-status form { flex:none; }
.email-status button { min-height:42px; margin:0; padding:10px 14px; font-size:13px; }
.email-status.verified { border-color:#a9ccb5; background:#f5fbf7; }
.status-check { color:#287a44; font-size:13px; font-weight:700; }
.verification-history { margin:0 0 34px; }
.history-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:11px; }
.history-heading h2 { margin:3px 0 5px; font-size:22px; letter-spacing:-.04em; }
.history-heading p:not(.section-label) { max-width:650px; margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.history-heading > span { flex:none; color:var(--muted); font:10px 'DM Mono',monospace; letter-spacing:.06em; }
.case-list { display:grid; gap:10px; }
.case-row { display:grid; grid-template-columns:145px minmax(0,1fr) auto; align-items:center; gap:18px; padding:18px 20px; border:1px solid var(--line); background:#fff; }
.case-row.inactive { background:#f7f8fa; opacity:.8; }
.case-state { display:grid; gap:5px; }
.case-state span { width:max-content; padding:4px 6px; background:#e9f7ee; color:#287a44; font:500 9px 'DM Mono',monospace; letter-spacing:.07em; }
.case-row.inactive .case-state span { background:#eceef1; color:#66707d; }
.case-state strong { font-size:14px; }
.case-row dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.case-row dt { color:var(--muted); font:9px 'DM Mono',monospace; letter-spacing:.05em; text-transform:uppercase; }
.case-row dd { margin:3px 0 0; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.case-row dd a { color:var(--ink); text-underline-offset:3px; }
.case-actions { display:grid; gap:7px; }
.case-row form { display:block; }
.case-open,.case-row button { min-height:38px; margin:0; padding:8px 11px; background:#fff; border:1px solid var(--line-strong); box-shadow:none; color:var(--ink); font:600 12px 'Space Grotesk',Arial,sans-serif; text-align:center; text-decoration:none; }
.case-row form button { width:100%; border-color:#c97a8d; color:#9b3049; }
.case-row button::after { display:none; }
.case-open:hover,.case-row button:hover { background:#f5f7f9; box-shadow:none; }
.case-row form button:hover { background:#fff0f4; }
.case-pagination { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:14px; color:var(--muted); font:11px 'DM Mono',monospace; }
.case-pagination > div { display:flex; align-items:center; gap:13px; }
.case-pagination a { color:var(--ink); font-weight:500; text-decoration:none; }
.case-pagination a:hover { text-decoration:underline; text-underline-offset:3px; }
.account-profile { margin:26px 0 0; padding:22px; border:1px solid var(--line); background:#fff; }
.account-profile form { grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:14px; }
.account-profile button { min-width:170px; margin:0; }
.account-profile small { display:block; margin-top:10px; color:var(--muted); font-size:12px; }

@media (max-width:560px) {
  .auth-header { min-height:68px; padding:15px 18px; }
  .brand { font-size:19px; }
  .auth-header nav a { padding:8px 12px; font-size:13px; }
  .auth-shell { margin-top:18px; padding:28px 22px; border-radius:4px; }
  .intro { margin-bottom:28px; }
  .email-status { grid-template-columns:1fr; align-items:start; }
  .email-status form,.email-status button { width:100%; }
  .history-heading,.case-row { grid-template-columns:1fr; align-items:start; }
  .history-heading { display:grid; }
  .case-row dl { grid-template-columns:1fr; gap:8px; }
  .case-row dl div { display:grid; grid-template-columns:80px 1fr; gap:10px; }
  .case-row dd { margin:0; }
  .case-actions,.case-row form,.case-row button,.case-open { width:100%; }
  .account-profile form { grid-template-columns:1fr; }
  .account-profile button { width:100%; }
  .case-pagination,.case-pagination > div { align-items:flex-start; flex-direction:column; gap:9px; }
}

@media (min-width:800px) {
  .account-shell {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:22px;
    width:min(1040px,calc(100% - 64px));
    padding:52px 56px;
  }
  .account-shell > .eyebrow,
  .account-shell > h1,
  .account-shell > .intro,
  .account-shell > .message,
  .account-shell > .email-status,
  .account-shell > .tools,
  .account-shell > .verification-history,
  .account-shell > .account,
  .account-shell > .account-profile,
  .account-shell > .inline-form { grid-column:1 / -1; }
  .account-shell > h1 { max-width:780px; }
  .account-shell > .intro { margin-bottom:38px; }
  .account-shell .plan-summary,
  .account-shell .usage-summary { min-height:126px; margin:0 0 38px; }
  .account-shell .usage-summary { display:flex; flex-direction:column; justify-content:center; }
  .account-shell .tools { margin-bottom:38px; }
  .account-shell .tool-card { min-height:170px; padding:30px 32px; }
  .account-shell .tool-card h2 { max-width:580px; font-size:25px; }
  .account-shell .tool-card p { font-size:14px; }
  .account-shell .account {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px 30px;
    margin:0;
    padding:25px 28px;
  }
  .account-shell .account dt { grid-row:1; }
  .account-shell .account dd { grid-row:2; margin:0; overflow-wrap:anywhere; }
  .account-shell .inline-form { justify-self:end; width:220px; margin-top:22px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; }
}
