:root {
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #68717e;
  --blue: #3347d8;
  --blue-dark: #2535b6;
  --blue-tint: #e5e8ff;
  --yellow: #ffd743;
  --cream: #f7f4ec;
  --white: #fff;
  --line: #d9d7ce;
  --green: #176a36;
  --red: #b3261e;
  --shadow: 7px 7px 0 var(--ink);
  --shadow-yellow: 7px 7px 0 var(--yellow);
  --radius: 16px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:where(a, button, input, textarea):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip-link { position: absolute; left: 14px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--ink); color: var(--white); border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 14px; }
.app-body { min-height: 100vh; overflow-x: clip; }
.app-header { width: min(1220px, calc(100% - 40px)); height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(17,24,39,.13); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 900; letter-spacing: -.05em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-size: 18px; }
.header-account { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.app-main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 90px; }
.notice { margin: 0 0 22px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); font-size: 14px; font-weight: 750; }
.notice.error { color: #fff; background: var(--red); }
.auth-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 470px); align-items: center; gap: clamp(50px, 8vw, 120px); min-height: calc(100vh - 190px); padding: 40px 5vw 100px; }
.eyebrow, .kicker { margin: 0; font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #35c46a; box-shadow: 0 0 0 4px #d9f7e4; }
.auth-copy h1, .dashboard-intro h1 { margin: 22px 0 22px; font-size: clamp(50px, 7vw, 88px); line-height: .91; letter-spacing: -.07em; }
.auth-copy h1 span, .dashboard-intro h1 span { color: var(--blue); }
.auth-copy > p:not(.eyebrow), .dashboard-intro > div:first-child > p:last-child { max-width: 52ch; margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.auth-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 30px; font-size: 12px; font-weight: 800; }
.auth-proof span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; }
.auth-proof strong { margin-right: 8px; }
.card { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-yellow); }
.auth-card { padding: 28px; box-shadow: var(--shadow); }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.auth-tab { padding: 10px 4px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 800; }
.auth-tab.active { color: var(--ink); border-color: var(--blue); }
.auth-card h2, .card h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.05; letter-spacing: -.045em; }
.auth-card > p { margin: 8px 0 24px; color: var(--muted); }
label { display: grid; gap: 7px; margin: 0; font-size: 12px; font-weight: 850; }
label .hint { color: var(--muted); font-size: 11px; font-weight: 600; }
input, textarea { width: 100%; border: 1.5px solid #b9b9b0; border-radius: 9px; background: #fffefa; padding: 12px 13px; outline: none; font-size: 15px; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
textarea { resize: vertical; line-height: 1.45; }
input:disabled, textarea:disabled { cursor: not-allowed; opacity: 1; background: #f4f4ef; color: var(--muted); border-color: #d7d6ce; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.auth-card form, .form-grid { display: grid; gap: 16px; }
.form-footnote { margin: 18px 0 0 !important; font-size: 11px; line-height: 1.5; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 16px; border: 2px solid var(--ink); border-radius: 9px; font-size: 13px; font-weight: 900; transition: transform .15s ease, background .15s ease, color .15s ease; }
.button:hover { transform: translate(-2px, -2px); }
.button:active { transform: translate(1px, 1px); }
.button-primary { background: var(--blue); color: #fff; box-shadow: 4px 4px 0 var(--yellow); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: var(--white); box-shadow: 3px 3px 0 var(--ink); }
.button-quiet { min-height: 34px; padding: 7px 11px; border-color: var(--line); background: transparent; color: var(--ink-soft); font-size: 12px; }
.button-danger { border-color: var(--red); background: #fff2f0; color: var(--red); }
.assistant-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.assistant-links .button { margin-bottom: 0; }
.button-chatgpt, .button-claude { width: fit-content; border-color: #111; background: #fff; color: var(--ink); text-decoration: none; }
.button-chatgpt { box-shadow: 3px 3px 0 #10a37f; }
.button-chatgpt:hover { background: #f1fffa; }
.button-claude { box-shadow: 3px 3px 0 #d97757; }
.button-claude:hover { background: #fff5f0; }
.button-wide { width: 100%; }
.dashboard-view { padding: 42px 0; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 18px 2vw 48px; }
.dashboard-intro h1 { margin-bottom: 18px; font-size: clamp(45px, 6vw, 76px); }
.status-stack { display: grid; justify-items: end; gap: 14px; flex: none; }
.status-pill, .connection-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 850; }
.status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #35c46a; box-shadow: 0 0 0 4px #d9f7e4; }
.status-dot.paused, .status-dot.off { background: #a4a9b1; box-shadow: 0 0 0 4px #ececef; }
.usage-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 20px 24px; margin-bottom: 30px; box-shadow: 5px 5px 0 var(--yellow); }
.usage-strip > div { display: grid; gap: 6px; border-right: 1px solid var(--line); }
.usage-strip > div:last-child { border-right: 0; }
.label { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.usage-strip strong { font-size: 16px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 24px; align-items: start; }
.profile-card, .telegram-card, .schedule-card, .billing-card, .danger-card { padding: 28px; }
.profile-card { box-shadow: 8px 8px 0 var(--yellow); }
.side-column { display: grid; gap: 24px; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.card-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.save-state { color: var(--green); font-size: 11px; font-weight: 850; white-space: nowrap; }
.save-state.editing { color: var(--blue); }
.save-state.required { color: var(--red); }
.kicker { color: var(--blue); margin-bottom: 9px; }
.card-number { color: #9aa0aa; font-size: 12px; font-weight: 900; }
.telegram-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 2px solid var(--ink); border-radius: 13px; background: #fff; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); }
.telegram-svg { width: 34px; height: 34px; display: block; }
.card-lede { margin: 14px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.form-grid { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.compact { gap: 12px; }
.product-websites-field { gap: 8px; }
.product-websites-field > .hint:last-of-type { margin-top: -2px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.pill-list:empty { display: none; }
.url-pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 8px 7px 11px; border: 1px solid #aeb3c2; border-radius: 999px; background: var(--blue-tint); color: var(--ink); font-size: 12px; font-weight: 750; }
.url-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-remove { display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 0; border-radius: 50%; background: var(--white); color: var(--ink-soft); font-size: 17px; line-height: 1; }
.pill-remove:hover { background: var(--red); color: var(--white); }
.pill-remove:disabled { cursor: not-allowed; opacity: .45; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 3px; }
.inline-status { min-height: 18px; color: var(--green); font-size: 12px; font-weight: 800; }
.connection-status { padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.connection-status.connected { color: var(--green); border-color: #9bd7ae; background: #f0fbf3; }
.deep-link-box { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; margin-top: 12px; padding: 11px; border-radius: 9px; background: #f5f5f1; color: var(--muted); font-size: 11px; }
.telegram-qr { width: 112px; height: 112px; display: block; border-radius: 5px; background: #fff; }
.deep-link-copy { display: grid; gap: 6px; min-width: 0; }
.deep-link-box a { overflow-wrap: anywhere; color: var(--blue); font-weight: 800; }
.deep-link-box small { font-size: 10px; }
.telegram-card .button + .button { margin-top: 10px; }
.billing-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 24px; box-shadow: 6px 6px 0 var(--blue); }
.billing-card .kicker { color: var(--blue); }
.billing-copy { max-width: 640px; }
.billing-copy p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.billing-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; min-width: 250px; }
.danger-card p:not(.kicker) { max-width: 70ch; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.danger-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 24px; border-color: #dfaaa4; box-shadow: none; }
.danger-card .kicker { color: var(--red); }
.delete-form { display: flex; align-items: end; gap: 10px; flex: none; }
.delete-form label { min-width: 180px; }
.delete-form input { border-color: #dfaaa4; }
@media (max-width: 930px) {
  .auth-view { grid-template-columns: 1fr; min-height: auto; padding-inline: 0; }
  .auth-copy { text-align: center; }
  .auth-copy > p:not(.eyebrow) { margin-inline: auto; }
  .auth-proof { justify-content: center; }
  .auth-card { width: min(470px, 100%); margin-inline: auto; }
  .dashboard-intro { align-items: start; flex-direction: column; }
  .status-stack { justify-items: start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .billing-card, .danger-card { align-items: start; flex-direction: column; }
  .billing-actions { justify-content: start; justify-items: start; }
  .delete-form { width: 100%; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .app-header, .app-main { width: min(100% - 28px, 1220px); }
  .app-header { height: 70px; }
  .header-account > span { display: none; }
  .auth-view { padding-top: 32px; }
  .auth-copy h1 { font-size: 52px; }
  .auth-copy > p:not(.eyebrow) { font-size: 16px; }
  .app-main { padding-top: 18px; }
  .dashboard-view { padding-top: 20px; }
  .dashboard-intro { padding-inline: 0; padding-bottom: 32px; }
  .dashboard-intro h1 { font-size: 50px; }
  .usage-strip { grid-template-columns: 1fr 1fr; padding: 16px; }
  .usage-strip > div:nth-child(2) { border-right: 0; }
  .usage-strip > div { padding: 4px 0; }
  .profile-card, .telegram-card, .schedule-card, .billing-card, .danger-card { padding: 20px; }
  .deep-link-box { grid-template-columns: 92px 1fr; }
  .telegram-qr { width: 92px; height: 92px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .delete-form { display: grid; }
  .delete-form label, .delete-form button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
