/* Presentation layer only. Dashboard data and control contracts stay in dashboard.js. */
:root {
  --ink: #17182e;
  --muted: #68697e;
  --teal: #5743bc;
  --teal-dark: #423192;
  --teal-light: #eeebfb;
  --navy: #111329;
  --paper: #f4f3fa;
  --line: #e4e2ee;
  --lime: #d7fc70;
  --violet: #7660e8;
  --cyan: #bcf1f2;
  --coral: #ffbdaf;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, .brand, .stat-card strong, .rule-current-price strong {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
::selection { background: var(--lime); color: var(--ink); }
button:focus-visible, a:focus-visible { outline-color: #7660e8; }
input:focus, select:focus { border-color: var(--violet); outline-color: #7660e840; }
.brand-mark { background: var(--lime); color: var(--ink); border-radius: 11px; }
.button { border-radius: 11px; min-height: 44px; font-size: 13px; font-weight: 650; transition: background .16s, transform .16s, box-shadow .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { background: var(--lime); color: #242d13; border-color: #bedf5f; box-shadow: 0 3px 0 #1113290a; }
.button-primary:hover:not(:disabled) { background: #c7f14e; color: #20280f; border-color: #abd146; }
.button-secondary { background: white; color: #37334f; border-color: #dcd8ed; }
.button-secondary:hover:not(:disabled) { background: #f0edfb; border-color: #c6bdee; }
.button-danger-quiet { color: #a73d43; background: #fff1f0; border-color: #efd2d2; }
.text-button, .forgot-link { color: #5743bc; font-weight: 600; }
.eyebrow { color: #6551bd; }
input, select { border-color: #dcd9e9; border-radius: 10px; min-height: 47px; color: var(--ink); }
input::placeholder { color: #7b7a8e; }
label { color: #343248; font-size: 13px; }
.field-help { color: #6b697e; }

/* A comfortable, colorful merchant workspace. */
.workspace-page { background: var(--paper); font-size: 14px; }
.sidebar { width: 248px; background: var(--navy); padding: 31px 19px 0; color: #e7e5f4; }
.sidebar .brand { color: #fff; font-size: 17px; gap: 10px; }
.sidebar .brand-mark { background: var(--lime); color: #242d13; width: 34px; height: 34px; }
.sidebar-caption { color: #9693b3; font-size: 9px; letter-spacing: 1.8px; margin: 41px 13px 15px; }
.side-nav { gap: 8px; }
.nav-item { border-radius: 12px; color: #b9b6d0; padding: 13px 14px; font-size: 13px; }
.nav-item > span:first-child { color: #aaa2d0; font-size: 21px; }
.nav-item:hover { background: #22243f; color: #fff; }
.nav-item.active { background: var(--lime); color: #262d19; }
.nav-item.active > span:first-child { color: #384323; }
.nav-count { color: inherit; border-color: #899e523d; background: #ffffff30; border-radius: 5px; }
.sidebar-bottom { padding-top: 34px; }
.sidebar-tip { background: #252342; border: 1px solid #454060; padding: 18px; border-radius: 17px; }
.sidebar-tip .telegram-icon { background: #8de4e8; color: #154a52; width: 32px; height: 32px; border-radius: 10px; font-size: 21px; }
.sidebar-tip strong { color: white; font-size: 13px; }
.sidebar-tip p { color: #c4bfdf; font-size: 11px; line-height: 1.7; }
.sidebar-text-button { color: var(--lime); font-size: 11px; }
.sidebar-user { border-color: #32324b; }
.sidebar-user .avatar { background: #d6caf8; border-color: #d6caf8; color: #392770; width: 35px; height: 35px; }
.sidebar-user strong { font-size: 12px; color: #efedf9; max-width: 132px; }
.sidebar-user span { font-size: 10px; color: #b9b4cf; }
.logout-button { color: #b9b4cf; }
.workspace-content { margin-left: 248px; width: calc(100% - 248px); }
.workspace-header { background: #ffffffce; border-color: #e6e2f2; height: 76px; padding-inline: 38px; }
.header-breadcrumb, .header-right { color: #706b87; font-size: 11px; }
.header-breadcrumb strong { color: #302a4b; }
.header-breadcrumb span { color: #a6a1bb; }
.header-divider { background: #dcd6eb; }
.connection-dot.connected:before { background: #597e24; box-shadow: 0 0 0 3px #d7fc7045; }
.workspace-main { padding: 35px 38px 42px; max-width: 1480px; }
.page-heading { margin-bottom: 27px; }
.page-heading .eyebrow { color: #6c59ad; font-size: 10px; letter-spacing: 1.5px; }
.page-heading h1 { font-size: clamp(27px, 2.6vw, 39px); letter-spacing: -1.4px; font-weight: 730; line-height: 1.2; }
.page-heading p { color: #68667e; font-size: 13px; line-height: 1.75; margin-top: 10px; }
.page-heading .button { min-height: 45px; font-size: 13px; padding: 12px 16px; }
.workspace-intro { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; background: #171932; color: white; border-radius: 23px; padding: 29px 34px; margin-bottom: 24px; align-items: center; }
.workspace-intro:before { content: ''; width: 390px; height: 390px; position: absolute; right: -150px; top: -100px; border: 1px solid #a493f631; border-radius: 50%; box-shadow: 0 0 0 48px #a493f608, 0 0 0 49px #a493f61a, 0 0 0 105px #a493f608; pointer-events: none; }
.workspace-intro > div { position: relative; z-index: 1; }
.intro-tag { color: var(--lime); display: block; font-size: 9px; font-weight: 650; letter-spacing: 1.6px; margin-bottom: 13px; }
.workspace-intro h2 { color: #fff; font-size: 29px; line-height: 1.17; letter-spacing: -.9px; font-weight: 650; }
.workspace-intro p { font-size: 12px; color: #c9c5dd; line-height: 1.8; max-width: 350px; margin-top: 13px; }
.workspace-flow { display: grid; justify-self: end; width: min(100%, 320px); }
.workspace-flow > div { display: grid; grid-template-columns: 32px 1fr; column-gap: 11px; padding: 10px 14px; border: 1px solid #7566b94d; border-radius: 11px; background: #292641; align-items: center; }
.flow-number { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; color: #c8bdf5; border: 1px solid #75689c; border-radius: 50%; font-size: 10px; font-weight: 650; }
.workspace-flow strong { font-size: 12px; font-weight: 600; color: #f1edff; }
.workspace-flow div > span:last-child { font-size: 10px; color: #bcb5d4; margin-top: 3px; }
.workspace-flow > div:last-child { background: #d7fc70; border-color: #d7fc70; }
.workspace-flow > div:last-child strong { color: #2a3617; }
.workspace-flow > div:last-child .flow-number { color: #3c491f; border-color: #809943; }
.workspace-flow > div:last-child > span:last-child { color: #48582a; }
.flow-arrow { color: #a191d2; justify-self: center; line-height: 14px; }
.stat-grid { gap: 17px; margin-bottom: 27px; }
.stat-card { border: 0; border-radius: 17px; padding: 22px 23px; background: #e7dffb; box-shadow: none; }
.stat-card:nth-child(2) { background: #ccf1f1; }
.stat-card:nth-child(3) { background: #ffdfd5; }
.stat-label { color: #514767; font-size: 12px; font-weight: 550; }
.stat-label span { color: #6e55a1; font-size: 21px; }
.stat-card:nth-child(2) .stat-label, .stat-card:nth-child(2) .stat-label span { color: #315e62; }
.stat-card:nth-child(3) .stat-label, .stat-card:nth-child(3) .stat-label span { color: #754941; }
.stat-card strong { color: #28203e; font-size: 37px; font-weight: 650; margin-top: 12px; }
.stat-card strong.stat-word { color: #28203e; font-size: 23px !important; padding-block: 10px; }
.stat-card small { color: #514861; font-size: 11px; line-height: 1.65; }
.setup-notice { background: #ede8fc; border: 1px solid #d6ccee; border-radius: 14px; padding: 18px 20px; }
.setup-icon { background: white; color: #7153c4; border-color: #d4c6ed; }
.setup-notice strong { color: #493474; font-size: 13px; }
.setup-notice p { color: #6c5c89; font-size: 12px; }
.setup-notice .button { background: white; color: #57398c; border-color: #cdbde7; font-size: 11px; }
.content-heading h2, .section-row h2 { color: #29243e; font-size: 18px; letter-spacing: -.4px; }
.content-heading p { color: #727086; font-size: 12px; line-height: 1.7; }
.count-label { color: #654ca1; background: #e9e2f9; font-size: 11px; border-radius: 6px; padding: 3px 7px; }
.segmented-control { background: #e9e5f2; border-radius: 10px; padding: 4px; }
.segmented-control button { color: #686078; font-size: 11px; border-radius: 7px; padding: 7px 11px; }
.segmented-control button.selected { color: #473467; }
.rule-list-actions > .text-button { color: #625183; font-size: 11px; }
.rules-grid { gap: 20px; }
.rule-card { border: 1px solid #e0dced; border-radius: 18px; padding: 23px 24px 0; box-shadow: 0 6px 17px #29234804; }
.rule-card-heading h3 { font-size: 16px; color: #30283f; }
.rule-card-heading p { font-size: 11px; color: #747085; max-width: 225px; }
.rule-card-heading .asset-icon { background: #e8e1fc; color: #6445b4; border-color: #d7caf6; width: 36px; height: 36px; font-size: 21px; }
.rule-card-heading > .badge { font-size: 10px; padding: 5px 8px; }
.badge { border-color: #ded7ec; color: #716382; background: #f1edf8; }
.badge-teal { color: #3f661f; border-color: #caddb1; background: #edf6de; }
.badge-teal .badge-dot { background: #638b36; }
.badge-amber { color: #80601c; border-color: #ead59e; background: #fff4d9; }
.badge-red { color: #9d3e45; border-color: #eec6cc; background: #ffedf0; }
.rule-current-price { margin-block: 24px 20px; }
.rule-current-price strong { font-size: 32px; color: #2f2544; font-weight: 650; }
.rule-current-price .caption, .rule-current-price small { color: #797286; font-size: 11px; }
.rule-current-price .price-unavailable { color: #7c718b; }
.rule-details { border-color: #e9e4f0; padding-block: 18px; gap: 17px; }
.rule-details dt { color: #7c7288; font-size: 11px; }
.rule-details dd { color: #40324f; font-size: 13px; }
.pair-fiat, .activity-action { color: #7a7286; }
.rule-reason { color: #756c81; font-size: 11px; }
.rule-card-footer { background: #f9f7fc; border-color: #e9e3f2; margin-inline: -24px; padding: 12px 20px; }
.rule-edit-button { color: #66507b; font-size: 12px; }
.rule-delete-button { color: #96879f; font-size: 17px; }
.toggle-button { color: #405527; background: #e6f6ca; border-color: #cddfb2; border-radius: 8px; min-height: 36px; font-size: 12px; padding: 8px 12px; }
.toggle-button:hover { background: #d7edb2; }
.toggle-button.running { color: #645373; border-color: #dbd0e3; background: #fff; }
.panel { border-color: #e3ddec; border-radius: 18px; box-shadow: 0 5px 15px #39285803; }
.section-row { margin-top: 32px; }
.section-row .text-button { color: #665088; font-size: 12px; }
.activity-row { border-color: #ede8f3; padding: 18px 24px; gap: 12px; }
.activity-symbol { color: #7655b6; background: #efe6ff; width: 31px; height: 31px; border-radius: 9px; font-size: 17px; }
.activity-copy strong { color: #4a3a5a; font-size: 13px; font-weight: 550; }
.activity-copy p, .activity-row time { color: #81748d; font-size: 11px; }
.workspace-footnote { color: #756c84; font-size: 11px; margin-top: 26px; }
.empty-state { border-color: #d0c3e6; background: #f8f5fe; border-radius: 18px; padding-block: 44px; }
.empty-state .empty-icon { background: #e9dffa; border-color: #dcd0f1; color: #7a5bad; border-radius: 14px; width: 50px; height: 50px; }
.empty-state h3 { font-size: 18px; color: #55406d; }
.empty-state p { color: #80708e; font-size: 13px; }
.empty-state .button { font-size: 12px; min-height: 42px; }
.loading-state { color: #71627f; }
.notice { font-size: 12px; border-radius: 12px; }
.notice strong { font-size: 12px; }
.notice-demo { color: #6e536e; background: #f1eaf9; border-color: #e0d1ed; }
.notice-teal { background: #eff8df; border-color: #d6e6bb; color: #466127; }
.notice-teal p, .notice-teal small { font-size: 12px; }
.form-error { font-size: 12px; border-radius: 10px; }
.roadmap-heading { align-items: center; }
.roadmap-caption { color: #8d7ca0; font-size: 9px; letter-spacing: 1.5px; font-weight: 650; }
.workspace-roadmap { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.roadmap-card { display: flex; align-items: flex-start; gap: 15px; border-radius: 17px; padding: 22px; }
.roadmap-call { background: #eee4fc; }
.roadmap-bank { background: #dfefec; }
.roadmap-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 26px; border-radius: 12px; background: #d8c7f5; color: #7250a3; flex: none; }
.roadmap-bank .roadmap-icon { background: #bcded7; color: #42786e; }
.roadmap-badge { display: inline-flex; color: #60457e; background: #ffffff87; font-size: 9px; font-weight: 650; letter-spacing: .1px; padding: 4px 8px; border-radius: 12px; }
.roadmap-bank .roadmap-badge { color: #3c685d; }
.roadmap-card h3 { font-size: 15px; color: #49335f; margin-top: 10px; letter-spacing: -.25px; }
.roadmap-bank h3 { color: #304c49; }
.roadmap-card p { font-size: 12px; color: #746480; line-height: 1.75; margin-top: 6px; }
.roadmap-bank p { color: #566d67; }

/* Connection, billing, account, and rule forms use the same visual vocabulary. */
.settings-panel { padding: 28px; }
.panel-heading h2, .settings-panel h2 { font-size: 18px; color: #352a46; }
.panel-heading p, .settings-panel > p { color: #766584; font-size: 13px; }
.panel-heading .badge { font-size: 10px; }
.service-icon { width: 40px; height: 40px; border-radius: 12px; }
.exchange-icon { color: #766313; background: #f5edb8; border-color: #e8dc8f; }
.telegram-service-icon { color: #2b6b79; background: #c9eff2; border-color: #b1dde0; }
.settings-panel label, .form-grid label, .subscription-plan label { font-size: 13px; color: #50405e; }
.settings-panel input, .form-grid input, .form-grid select { font-size: 14px; }
.settings-panel .field-help, .subscription-plan > .field-help, .dialog-description, .form-section > .field-help { color: #786787; font-size: 12px; line-height: 1.8; }
.connection-summary { color: #576938; background: #f1f9e5; border-color: #d7e7c1; font-size: 11px; }
.telegram-connection-art > div { background: #bfecef; color: #3b7180; }
.art-connection-line { border-color: #bbaad8; }
.art-connection-line:after { color: #7f62aa; background: #f2eafd; }
.telegram-connection-art .brand-mark { background: var(--lime); color: #394524; }
.settings-panel > h3 { font-size: 20px; }
.billing-layout { gap: 25px; }
.subscription-plan { padding: 30px; background: #f0e9fc; border-color: #ded0f0; }
.subscription-plan .eyebrow { color: #685081; font-size: 10px; }
.subscription-plan .pricing-top > span:last-child { color: #8963b0; }
.subscription-plan .pricing-price { color: #3e2857; font-size: 47px; font-weight: 700; }
.subscription-plan .pricing-price small { color: #736085; }
.subscription-plan > p, .subscription-plan .pricing-list { color: #705584; font-size: 13px; }
.subscription-plan .pricing-list { border-color: #ddcceb; }
.subscription-plan .pricing-list li:before { color: #7e5c9f; }
.subscription-details { color: #695276; font-size: 12px; }
.subscription-plan .button { font-size: 13px; min-height: 47px; }
.billing-explainer { padding: 31px; }
.billing-explainer > .eyebrow { color: #7d6098; font-size: 10px; }
.billing-explainer h2 { color: #493357; font-size: 30px; }
.payment-steps li > span { color: #754e9b; background: #eee4fa; border-color: #ddcbed; width: 27px; height: 27px; font-size: 11px; }
.payment-steps strong { color: #563c66; font-size: 13px; }
.payment-steps p { color: #846c94; font-size: 12px; }
.subtle-note { border-color: #dfd2e9; background: #f7f1fb; }
.subtle-note p { color: #816591; font-size: 11px; }
.subtle-note > span { color: #8860a1; }
.data-table { font-size: 13px; }
.data-table th { color: #7d608b; background: #fbf8fe; border-color: #ebe0f2; font-size: 11px; }
.data-table td { color: #70547e; border-color: #ebe0f2; }
.data-table a { color: #734998; }
.account-avatar { color: #6e4c8c; background: #e7d5f7; border-color: #d8c0ed; border-radius: 16px; width: 60px; height: 60px; }
.detail-list > div, .admin-user { border-color: #e9dfee; }
.detail-list dt, .detail-list dd { font-size: 13px; color: #7b6089; }
.detail-list dd { color: #553b63; }
.admin-user strong { color: #5f4070; font-size: 13px; }
.admin-user p { color: #866995; font-size: 12px; }
.rule-dialog, .confirm-dialog { border-color: #dcd0e9; border-radius: 20px; box-shadow: 0 30px 90px #25143345; }
.rule-dialog::backdrop, .confirm-dialog::backdrop { background: #17132988; }
.dialog-heading { border-color: #e8deef; padding: 24px 28px 22px; }
.dialog-heading h2 { font-size: 28px; color: #422b53; }
.dialog-heading .eyebrow { color: #8a60aa; font-size: 10px; }
.dialog-scroll { padding-inline: 28px; }
.form-section { border-color: #ede3f3; }
.form-section h3 { color: #54365f; font-size: 15px; }
.form-section-heading .text-button { color: #8b5aab; font-size: 12px; }
.dialog-footer, .confirm-footer { border-color: #e6d9f0; background: #fbf7fe; }
.dialog-footer .button, .confirm-footer .button { font-size: 12px; min-height: 41px; }
.dialog-footer > span { color: #857091; font-size: 11px; }
.confirm-content h2 { color: #4d305e; }
.confirm-content p { color: #80648f; font-size: 13px; }
.toast { color: #4b632e; background: #f9fff0; border-color: #d5e3be; border-radius: 14px; font-size: 12px; }
.toast > span:first-child { background: #dfefc5; color: #537729; }

/* Authentication: high contrast visual story and a quiet form surface. */
.auth-page { background: #f4f1fa; }
.auth-layout { grid-template-columns: 1.04fr 1fr; }
.auth-story { background: #171932; color: #f8f5ff; padding: 43px 56px 31px; min-height: 100vh; }
.auth-story:after { width: 510px; height: 510px; border-color: #6d60a733; right: -200px; bottom: -150px; box-shadow: 0 0 0 55px #7660e80a, 0 0 0 56px #7660e825, 0 0 0 110px #7660e80a; }
.auth-story .brand { color: white; font-size: 21px; position: relative; z-index: 1; }
.auth-story .brand-mark { background: var(--lime); color: #29321b; }
.auth-story-copy { padding: 60px 0; position: relative; z-index: 1; max-width: 500px; width: 100%; }
.auth-story-copy > .eyebrow { color: #bab0de; font-size: 10px; letter-spacing: 1.6px; }
.auth-story h1 { color: white; font-size: clamp(38px, 3.8vw, 63px); line-height: 1.09; letter-spacing: -2.8px; font-weight: 700; margin-block: 19px 24px; }
.auth-story h1 > span { color: var(--lime); }
.auth-story-copy > p { color: #c4bddb; font-size: 15px; line-height: 1.8; max-width: 410px; }
.auth-process { margin-top: 30px; max-width: 380px; }
.auth-process-step { display: flex; gap: 13px; padding: 12px 15px; border: 1px solid #5e507d; border-radius: 13px; background: #282442; align-items: center; }
.auth-process-step > span { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; flex: none; border-radius: 10px; background: #4b3a68; color: #d3bdf5; font-size: 22px; }
.auth-process-step strong { display: block; font-size: 12px; color: #eee7f8; font-weight: 600; }
.auth-process-step small { display: block; margin-top: 4px; font-size: 11px; color: #b9a9cc; }
.auth-process-line { display: block; height: 12px; width: 1px; background: #7e5da0; margin-left: 33px; }
.auth-process-step:last-child { background: #ccedf0; border-color: #ccedf0; }
.auth-process-step:last-child > span { background: #abd6dd; color: #326875; }
.auth-process-step:last-child strong { color: #254c59; }
.auth-process-step:last-child small { color: #477481; }
.auth-story-pills { margin-top: 27px; gap: 7px; }
.auth-story-pills span { border-color: #665279; color: #cfc1dd; background: #2b224028; font-size: 10px; padding: 7px 11px; }
.auth-story-bottom { color: #b5a7c9; font-size: 11px; line-height: 1.7; }
.auth-story-bottom .small-dot { background: var(--lime); }
.auth-form-section { background: #f6f3fb; padding: 47px 57px 29px; }
.auth-back { font-size: 12px; color: #746783; }
.auth-back:hover { color: #63449a; }
.auth-form-wrap { width: min(100%, 402px); padding-block: 49px; }
.auth-form-wrap > .eyebrow { font-size: 10px; color: #7a56a4; letter-spacing: 1.7px; }
.auth-form-wrap h2 { color: #34263f; font-size: 36px; line-height: 1.15; letter-spacing: -1.1px; font-weight: 700; margin-block: 17px; }
.auth-form-wrap > p { color: #7d6b8c; font-size: 14px; }
/* Official Google brand assets are served locally, without third-party scripts. */
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/vendor/google/google-sans-medium.ttf') format('truetype');
}
.auth-form-wrap .auth-google-form { margin-top: 28px; }
.google-signin-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px; border: 1px solid #747775; border-radius: 12px; background: #fff; color: #1f1f1f; font-family: 'Google Sans', Arial, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px; transition: box-shadow .15s, border-color .15s; }
.google-signin-button:hover:not(:disabled) { border-color: #515452; box-shadow: 0 1px 3px #3c404326, 0 1px 2px #3c40434d; }
.google-signin-button:focus-visible { outline: 3px solid #7252bb; outline-offset: 4px; }
.google-signin-button:active:not(:disabled) { box-shadow: inset 0 0 0 1px #747775; }
.google-signin-button:disabled { opacity: 1; color: #6d706f; border-color: #c6c9c7; cursor: not-allowed; }
.google-signin-icon { display: block; width: 20px; height: auto; flex: none; }
.google-signin-status { margin-top: 10px; color: #786786; font-size: 12px; line-height: 1.7; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 15px; margin-block: 24px; color: #84728f; font-size: 12px; line-height: 1.5; }
.auth-divider:before, .auth-divider:after { content: ''; height: 1px; flex: 1; background: #dfd4e9; }
.auth-divider + .stack-form { margin-top: 0; }
.auth-form-wrap label { color: #5d456e; font-size: 13px; gap: 9px; }
.auth-form-wrap input { font-size: 14px; min-height: 51px; border-color: #dcd0e8; padding-inline: 15px; border-radius: 12px; }
.auth-form-wrap input::placeholder { color: #9887a4; }
.auth-form-wrap .button { min-height: 50px; font-size: 14px; }
.auth-form-wrap .field-help, .auth-form-wrap .forgot-link { font-size: 12px; }
.auth-form-wrap .auth-switch { font-size: 13px; color: #847092; margin-top: 25px; }
.auth-switch a { color: #7d4da3; }
.auth-privacy { color: #857091; border-color: #e3d6ec; font-size: 11px; }
.auth-privacy span { color: #8c66a7; }
.auth-footer { color: #897797; font-size: 11px; }

@media (min-width: 1500px) {
  .workspace-main { padding-top: 41px; }
  .workspace-intro { grid-template-columns: 1.3fr 1fr; padding: 33px 40px; }
  .workspace-intro h2 { font-size: 34px; }
  .auth-story-copy { margin-inline: auto; }
}
@media (max-width: 1150px) {
  .sidebar { width: 225px; padding-inline: 17px; }
  .sidebar .brand { font-size: 15px; }
  .workspace-content { margin-left: 225px; width: calc(100% - 225px); }
  .workspace-main { padding-inline: 28px; }
  .workspace-header { padding-inline: 28px; }
  .workspace-intro { padding: 26px; gap: 22px; }
  .workspace-intro h2 { font-size: 27px; }
  .stat-card { padding: 20px; }
  .stat-card strong.stat-word { font-size: 21px !important; }
  .rule-card-heading h3 { font-size: 14px; }
  .rule-card-heading p { max-width: 155px; }
  .settings-panel, .subscription-plan, .billing-explainer { padding: 24px; }
  .auth-story { padding-inline: 38px; }
  .auth-form-section { padding-inline: 40px; }
}
@media (max-width: 950px) {
  .sidebar { width: 207px; padding-inline: 14px; }
  .sidebar .brand { font-size: 14px; }
  .sidebar .brand-mark { width: 30px; height: 30px; }
  .workspace-content { margin-left: 207px; width: calc(100% - 207px); }
  .workspace-main { padding: 29px 22px 35px; }
  .workspace-header { padding-inline: 22px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading .button { padding-inline: 13px; font-size: 12px; }
  .workspace-intro { grid-template-columns: 1fr 1fr; gap: 20px; padding: 25px; }
  .workspace-intro h2 { font-size: 24px; }
  .workspace-intro p { font-size: 11px; }
  .intro-tag { font-size: 8px; letter-spacing: 1.1px; }
  .workspace-flow > div { grid-template-columns: 24px 1fr; padding: 9px; gap: 9px; }
  .flow-number { width: 25px; height: 25px; font-size: 9px; }
  .workspace-flow strong { font-size: 10px; }
  .workspace-flow div > span:last-child { font-size: 9px; }
  .stat-card { padding: 18px 15px; }
  .stat-label { font-size: 10px; }
  .stat-card small { font-size: 10px; }
  .stat-card strong.stat-word { font-size: 18px !important; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-card-heading h3 { font-size: 16px; }
  .rule-card-heading p { max-width: 260px; }
  .workspace-roadmap { grid-template-columns: 1fr; gap: 13px; }
  .roadmap-card { padding: 20px; }
  .roadmap-heading h2 { font-size: 16px; }
  .roadmap-caption { font-size: 8px; }
  .settings-grid, .billing-layout { grid-template-columns: 1fr; }
  .auth-story { padding-inline: 28px; }
  .auth-story h1 { font-size: 42px; letter-spacing: -1.7px; }
  .auth-story-copy > p { font-size: 13px; }
  .auth-story .brand { font-size: 18px; }
  .auth-form-section { padding-inline: 30px; }
  .auth-form-wrap h2 { font-size: 31px; }
  .auth-process-step { padding: 11px; gap: 10px; }
  .auth-process-step strong { font-size: 11px; }
  .auth-process-step small { font-size: 10px; }
}
@media (max-width: 720px) {
  .sidebar { width: 265px; padding: 28px 22px 0; }
  .sidebar .brand { font-size: 18px; }
  .sidebar .brand-mark { width: 34px; height: 34px; }
  .sidebar-user strong { max-width: 138px; }
  .workspace-content { width: 100%; margin: 0; }
  .workspace-header { height: 67px; padding-inline: 18px; }
  .header-breadcrumb, .header-right { font-size: 10px; }
  .workspace-main { padding: 24px 20px 35px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 15px; }
  .page-heading h1 { max-width: none; font-size: 29px; line-height: 1.14; }
  .page-heading p { max-width: none; font-size: 13px; }
  .page-heading .eyebrow { font-size: 9px; letter-spacing: 1.2px; }
  .page-heading .button { margin-top: 0; min-height: 43px; font-size: 12px; }
  .workspace-intro { padding: 25px; gap: 22px; border-radius: 19px; }
  .workspace-intro h2 { font-size: 26px; }
  .workspace-intro p { font-size: 12px; }
  .intro-tag { font-size: 9px; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 17px 15px; border-radius: 14px; }
  .stat-label { font-size: 10px; line-height: 1.6; min-height: 31px; }
  .stat-label span { font-size: 19px; }
  .stat-card strong { font-size: 33px; }
  .stat-card strong.stat-word { font-size: 18px !important; }
  .stat-card small { font-size: 10px; min-height: 32px; }
  .setup-notice { padding: 17px; }
  .setup-notice strong { font-size: 13px; }
  .setup-notice p { font-size: 11px; }
  .setup-notice .button { font-size: 11px; }
  .content-heading h2, .section-row h2 { font-size: 18px; }
  .content-heading p { font-size: 12px; }
  .rule-card { padding: 23px 22px 0; }
  .rule-card-heading h3 { font-size: 16px; }
  .rule-card-heading p { font-size: 11px; max-width: 215px; }
  .rule-card-heading > .badge { font-size: 10px; }
  .rule-current-price strong { font-size: 31px; }
  .rule-current-price .caption, .rule-current-price small, .rule-details dt { font-size: 11px; }
  .rule-details dd { font-size: 13px; }
  .rule-card-footer { margin-inline: -22px; }
  .rule-reason { font-size: 11px; }
  .rule-edit-button, .toggle-button { font-size: 12px; }
  .activity-row { padding: 17px; gap: 10px; }
  .activity-copy strong { font-size: 12px; }
  .activity-copy p, .activity-row time { font-size: 11px; }
  .activity-row time { max-width: 71px; }
  .section-row .text-button { font-size: 11px; }
  .workspace-footnote { font-size: 11px; }
  .notice-demo { font-size: 11px; }
  .notice-demo strong { font-size: 11px; }
  .roadmap-heading { flex-wrap: wrap; gap: 8px; }
  .roadmap-caption { font-size: 9px; }
  .roadmap-card h3 { font-size: 16px; }
  .roadmap-card p { font-size: 12px; }
  .settings-panel, .subscription-plan, .billing-explainer, .account-panel { padding: 23px; }
  .panel-heading { flex-wrap: wrap; }
  .panel-heading .badge { margin-left: 49px; }
  .panel-heading h2, .settings-panel h2 { font-size: 17px; }
  .panel-heading p { font-size: 12px; }
  .settings-panel label, .form-grid label { font-size: 13px; }
  .auth-page input, .workspace-page input, .workspace-page select { font-size: 16px; }
  .settings-panel .field-help, .subscription-plan > .field-help { font-size: 12px; }
  .detail-list dt, .detail-list dd { font-size: 12px; }
  .dialog-heading { padding: 23px 22px 19px; }
  .dialog-heading h2 { font-size: 25px; }
  .dialog-scroll { padding-inline: 22px; }
  .dialog-footer { padding: 16px 20px; }
  .dialog-footer > span { font-size: 9px; }
  .dialog-footer .button { font-size: 11px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 0; padding: 26px 26px 30px; }
  .auth-story-copy { padding: 39px 0 0; max-width: none; }
  .auth-story h1 { font-size: 42px; margin-block: 17px 19px; line-height: 1.05; letter-spacing: -1.5px; }
  .auth-story h1 > span > br { display: none; }
  .auth-story-copy > p { font-size: 13px; max-width: 400px; }
  .auth-story-copy > .eyebrow { font-size: 9px; }
  .auth-process, .auth-story-pills, .auth-story-bottom { display: none; }
  .auth-form-section { padding: 26px; }
  .auth-form-wrap { max-width: 460px; padding-block: 34px 42px; }
  .auth-form-wrap h2 { font-size: 32px; }
  .auth-form-wrap > p { font-size: 13px; }
  .auth-back { font-size: 12px; }
  .auth-footer { font-size: 10px; }
}
@media (max-width: 520px) {
  .workspace-intro { grid-template-columns: 1fr; }
  .workspace-flow { width: 100%; max-width: none; justify-self: stretch; }
  .workspace-flow > div { grid-template-columns: 29px 1fr auto; gap: 8px; padding: 10px 11px; }
  .flow-number { grid-row: auto; width: 28px; height: 28px; }
  .workspace-flow strong { font-size: 11px; }
  .workspace-flow div > span:last-child { font-size: 9px; margin: 0; text-align: right; }
  .stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { display: grid; grid-template-columns: 1fr auto; column-gap: 13px; padding: 18px 21px; align-items: center; }
  .stat-label { min-height: 0; display: flex; justify-content: flex-start; gap: 9px; font-size: 12px; }
  .stat-label span { order: -1; display: block; }
  .stat-card strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 32px; }
  .stat-card strong.stat-word { font-size: 21px !important; padding: 0; }
  .stat-card small { min-height: 0; font-size: 11px; margin-top: 5px; }
  .rule-card-heading p { max-width: 185px; }
  .workspace-main { padding-inline: 17px; }
  .roadmap-card { padding: 19px; }
  .roadmap-icon { width: 35px; height: 35px; }
}
@media (max-width: 390px) {
  .workspace-main { padding-inline: 14px; }
  .workspace-header { padding-inline: 14px; }
  .header-breadcrumb, .header-right { font-size: 9px; }
  .page-heading h1 { font-size: 27px; }
  .workspace-intro { padding: 22px; }
  .workspace-intro h2 { font-size: 27px; }
  .workspace-flow > div { grid-template-columns: 27px 1fr; }
  .flow-number { grid-row: span 2; }
  .workspace-flow div > span:last-child { grid-column: 2; text-align: left; }
  .workspace-flow strong { font-size: 12px; }
  .rule-card-heading h3 { font-size: 14px; }
  .rule-card-heading p { max-width: 142px; }
  .rule-card-heading > .badge { font-size: 9px; }
  .rule-current-price small { font-size: 10px; }
  .dialog-footer { padding-inline: 17px; }
  .dialog-footer .button { font-size: 10px; padding-inline: 11px; }
  .form-grid { gap: 18px 13px; }
  .form-grid label { font-size: 12px; }
  .auth-story, .auth-form-section { padding-inline: 23px; }
  .auth-story h1 { font-size: 39px; }
}
@media (prefers-reduced-motion: reduce) {
  .button:hover:not(:disabled) { transform: none; }
}

/* Account portal: trading controls live exclusively in the linked Telegram chat. */
.portal-actions { flex-shrink: 0; }
.portal-guide-link { display: inline-block; color: var(--lime); font-size: 12px; margin-top: 16px; font-weight: 650; }
.portal-guide-link:hover { color: white; }
.portal-toolkit { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
.portal-menu-panel, .portal-account-panel { padding: 27px; min-width: 0; }
.portal-toolkit h3 { font-size: 23px; line-height: 1.35; letter-spacing: -.65px; margin: 11px 0; }
.portal-toolkit p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.portal-toolkit code { font-size: .9em; overflow-wrap: anywhere; }
.portal-menu-list { margin: 22px 0 17px; }
.portal-menu-list > div { display: grid; grid-template-columns: minmax(128px, 1fr) 1.3fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; }
.portal-menu-list > div:last-child { border-bottom: 0; }
.portal-menu-list dt { color: #50408d; font-weight: 650; font-size: 11px; }
.portal-menu-list dd { margin: 0; color: #69667a; font-size: 11px; line-height: 1.6; }
.portal-account-panel { background: linear-gradient(150deg, #f0ecff, #f8f6fe 70%); }
.portal-account-icon { background: #dfd7fa; color: #574395; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 29px; margin-bottom: 25px; }
.portal-account-links { display: grid; margin: 23px 0; }
.portal-account-links button { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #e0d9f1; text-align: left; }
.portal-account-panel .subtle-note { background: #fff9; margin-top: 24px; }
@media (max-width: 1100px) { .portal-toolkit { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .portal-actions { width: 100%; } .portal-actions .button { width: 100%; } .portal-menu-panel, .portal-account-panel { padding: 22px; } .portal-menu-list > div { grid-template-columns: 1fr 1.2fr; gap: 10px; } }
