:root {
  --ink-0: #050505;
  --ink-1: #080807;
  --ink-2: #0d0d0c;
  --ink-3: #121211;
  --ink-4: #181817;
  --ink-5: #20201e;
  --paper: #f6f3ee;
  --muted: #aaa7a1;
  --muted-2: #85817b;
  --copper: #f26a21;
  --copper-2: #ff8a43;
  --copper-soft: rgba(242, 106, 33, .12);
  --copper-line: rgba(242, 106, 33, .34);
  --green: #54c879;
  --green-soft: rgba(84, 200, 121, .1);
  --yellow: #e9b949;
  --red: #ed6a5a;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --shadow: 0 28px 70px rgba(0, 0, 0, .36);
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sidebar: 276px;
  --topbar: 72px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--ink-0); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 0%, rgba(242, 106, 33, .055), transparent 25rem),
    var(--ink-1);
  color: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }

button { color: inherit; }

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

a { color: inherit; }

::selection { color: #160800; background: var(--copper-2); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-1); }
::-webkit-scrollbar-thumb { background: #30302e; border: 3px solid var(--ink-1); border-radius: 99px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; z-index: 999; top: 10px; left: 10px; transform: translateY(-140%); padding: 10px 14px; border-radius: 8px; background: var(--paper); color: #111; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(242, 106, 33, .035), transparent 11rem),
    rgba(7, 7, 6, .98);
}

.brand-lockup {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--copper);
  background: var(--copper-soft);
  border: 1px solid var(--copper-line);
  border-radius: 11px;
  box-shadow: inset 0 0 20px rgba(242, 106, 33, .06);
}

.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.brand-name b { color: var(--copper); font-weight: 600; }
.sidebar-close { display: none; margin-left: auto; }

.plan-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin: 18px 18px 10px;
  padding: 13px;
  text-align: left;
  cursor: default;
  border: 1px solid var(--copper-line);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(242, 106, 33, .095), rgba(255, 255, 255, .018));
}

.plan-card:hover { border-color: rgba(242, 106, 33, .62); }
.plan-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--copper); background: rgba(242, 106, 33, .12); }
.plan-icon svg, .plan-arrow { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.plan-card strong, .plan-card small { display: block; }
.plan-card strong { font-size: 13px; font-weight: 600; }
.plan-card small { margin-top: 1px; color: var(--muted-2); font-size: 10px; }
.plan-arrow { width: 15px; color: var(--muted-2); }

.nav-groups { flex: 1; overflow-y: auto; padding: 6px 12px 20px; }
.nav-group { padding: 13px 0 10px; border-bottom: 1px solid var(--line); }
.nav-group:last-child { border-bottom: 0; }
.nav-group > p { margin: 0 10px 7px; color: #5d5a55; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 39px;
  grid-template-columns: 21px 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 2px 0;
  padding: 0 11px;
  color: #96928d;
  text-align: left;
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  background: transparent;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.nav-item:hover { color: #ddd9d3; background: rgba(255, 255, 255, .035); transform: translateX(2px); }
.nav-item.active { color: #fff7f0; background: linear-gradient(90deg, rgba(242, 106, 33, .19), rgba(242, 106, 33, .07)); box-shadow: inset 2px 0 0 var(--copper); }
.nav-item.active > svg { color: var(--copper); }
.nav-item > svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span:not(.nav-count) { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.nav-count { min-width: 20px; padding: 1px 5px; color: var(--muted); font-family: var(--mono); font-size: 9px; text-align: center; border: 1px solid var(--line); border-radius: 99px; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 35; top: 0; display: flex; height: var(--topbar); align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(8, 8, 7, .86); backdrop-filter: blur(18px); }
.topbar-left, .topbar-actions, .breadcrumb, .profile-button { display: flex; align-items: center; }
.topbar-left { min-width: 0; gap: 12px; }
.breadcrumb { min-width: 0; gap: 8px; color: var(--muted-2); font-size: 11px; }
.breadcrumb svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; transform: rotate(-90deg); }
.breadcrumb strong { overflow: hidden; max-width: 240px; color: #c8c4be; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.topbar-actions { gap: 9px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .018); }
.icon-button:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .045); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-close { display: none; }
.menu-button { display: none; }

.command-button { display: flex; width: 190px; height: 35px; align-items: center; justify-content: space-between; padding: 0 9px 0 12px; color: #625f5a; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .018); font-size: 10px; }
.command-button kbd { padding: 2px 5px; color: #77736d; font-family: var(--mono); font-size: 8px; border: 1px solid var(--line); border-radius: 4px; background: #11110f; }
.profile-button { gap: 7px; padding: 0; cursor: pointer; border: 0; background: transparent; }
.profile-button span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #1b1b1a; font-size: 11px; font-weight: 600; }
.profile-button svg { width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 1.7; }

.main-content { width: min(1260px, 100%); min-height: calc(100vh - var(--topbar)); margin: 0 auto; padding: 42px clamp(24px, 3.6vw, 58px) 70px; outline: none; }
.view-enter { animation: viewIn .42s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading-copy { max-width: 740px; }
.eyebrow { margin: 0 0 8px; color: var(--copper); font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.page-heading h1 { margin: 0; color: #f8f6f2; font-size: clamp(30px, 4vw, 46px); font-weight: 550; letter-spacing: -.055em; line-height: 1.04; }
.page-heading p:not(.eyebrow) { max-width: 690px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

.status-pill { display: inline-flex; height: 32px; align-items: center; gap: 8px; padding: 0 12px; color: #c4c0ba; font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .045em; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .025); text-transform: uppercase; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; content: ''; border-radius: 50%; background: var(--muted-2); }
.status-pill.functional { color: #a9e7bc; border-color: rgba(84, 200, 121, .3); background: var(--green-soft); }
.status-pill.functional::before { background: var(--green); box-shadow: 0 0 8px rgba(84, 200, 121, .5); }

.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 9px; background: #11110f; color: #dedbd6; font-size: 11px; font-weight: 550; text-decoration: none; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .22); background: #171715; }
.button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { color: #160900; border-color: var(--copper-2); background: var(--copper-2); box-shadow: 0 7px 22px rgba(242, 106, 33, .16); }
.button.primary:hover { background: #ff9b5f; }
.button.ghost { background: transparent; }
.button.danger { color: #ef9a8f; border-color: rgba(237, 106, 90, .3); background: rgba(237, 106, 90, .06); }
.button.small { min-height: 32px; padding: 0 11px; font-size: 10px; border-radius: 8px; }
.button.icon-only { width: 36px; padding: 0; }
.button[disabled] { opacity: .43; cursor: not-allowed; transform: none; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(20, 20, 18, .96), rgba(11, 11, 10, .96)); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; color: #eeece8; font-size: 15px; font-weight: 550; letter-spacing: -.02em; }
.panel-header p { margin: 5px 0 0; color: #aaa7a1; font-size: 12px; line-height: 1.55; }
.panel-body { padding: 22px; }

.dashboard-hero { position: relative; display: grid; min-height: 260px; grid-template-columns: 1.4fr .7fr; gap: 30px; overflow: hidden; margin-bottom: 18px; padding: clamp(25px, 4vw, 42px); border: 1px solid var(--copper-line); border-radius: 22px; background: #0e0d0c; box-shadow: var(--shadow); }
.dashboard-hero::before { position: absolute; inset: 0; content: ''; pointer-events: none; background: linear-gradient(102deg, rgba(242, 106, 33, .12), transparent 42%), radial-gradient(circle at 93% 18%, rgba(242, 106, 33, .18), transparent 15rem); }
.dashboard-hero::after { position: absolute; inset: 0; content: ''; opacity: .08; pointer-events: none; background-image: radial-gradient(#fff 0.55px, transparent .55px); background-size: 16px 16px; mask-image: linear-gradient(90deg, transparent, black); }
.hero-copy, .hero-orbit { position: relative; z-index: 1; }
.hero-copy { align-self: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 17px; color: var(--copper-2); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.hero-kicker::before { width: 20px; height: 1px; content: ''; background: var(--copper); }
.dashboard-hero h1 { max-width: 620px; margin: 0; font-size: clamp(34px, 5vw, 58px); font-weight: 520; letter-spacing: -.065em; line-height: .98; }
.dashboard-hero h1 em { color: var(--copper-2); font-style: normal; }
.dashboard-hero p { max-width: 540px; margin: 16px 0 22px; color: #aaa59e; font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-orbit { display: grid; place-items: center; }
.orbit { position: relative; display: grid; width: 190px; height: 190px; place-items: center; border: 1px solid rgba(242, 106, 33, .2); border-radius: 50%; box-shadow: 0 0 70px rgba(242, 106, 33, .08), inset 0 0 45px rgba(242, 106, 33, .04); }
.orbit::before, .orbit::after { position: absolute; content: ''; border: 1px solid var(--line); border-radius: 50%; }
.orbit::before { width: 142px; height: 142px; }
.orbit::after { width: 94px; height: 94px; border-color: var(--copper-line); }
.orbit-core { position: relative; z-index: 2; text-align: center; }
.orbit-core strong { display: block; font-family: var(--mono); font-size: 36px; font-weight: 500; letter-spacing: -.07em; }
.orbit-core span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.orbit-dot { position: absolute; top: 21px; left: 32px; width: 9px; height: 9px; border: 2px solid #1b0d05; border-radius: 50%; background: var(--copper); box-shadow: 0 0 14px var(--copper); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { min-height: 120px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #0e0e0d; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 10px; }
.metric-icon { display: grid; width: 29px; height: 29px; place-items: center; color: var(--copper); border: 1px solid var(--copper-line); border-radius: 8px; background: var(--copper-soft); }
.metric-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.metric-card strong { display: block; margin-top: 12px; font-family: var(--mono); font-size: 25px; font-weight: 500; letter-spacing: -.05em; }
.metric-card small { color: #918d87; font-size: 11px; line-height: 1.45; }

.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-card { min-height: 150px; padding: 17px; text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 13px; background: #0e0e0d; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.quick-card:hover { transform: translateY(-2px); border-color: var(--copper-line); background: #12110f; }
.quick-card .metric-icon { margin-bottom: 22px; }
.quick-card strong { display: block; font-size: 13px; font-weight: 600; }
.quick-card p { margin: 6px 0 0; color: #aaa7a1; font-size: 12px; line-height: 1.5; }
.quick-card.featured { border-color: var(--copper-line); background: linear-gradient(145deg, rgba(242, 106, 33, .1), #0d0d0c); }
.activity-list { display: grid; gap: 2px; }
.activity-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { display: grid; width: 30px; height: 30px; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; }
.activity-dot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.activity-row strong, .activity-row span { display: block; }
.activity-row strong { color: #ddd9d3; font-size: 12px; font-weight: 550; }
.activity-row span { color: #97938d; font-size: 11px; }
.activity-row time { color: #615e59; font-family: var(--mono); font-size: 8px; }

.generator-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 18px; align-items: start; }
.generator-form .panel-body { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #bbb7b0; font-size: 12px; font-weight: 550; }
.field label span { color: #8f8b85; font-weight: 400; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; z-index: 1; top: 50%; left: 13px; width: 16px; height: 16px; color: var(--copper); fill: none; stroke: currentColor; stroke-width: 1.7; transform: translateY(-50%); pointer-events: none; }
.input-wrap input, .input-wrap select { padding-left: 41px; }
input, textarea, select { width: 100%; color: #e8e4de; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: #090908; transition: border-color .15s ease, box-shadow .15s ease; }
input, select { height: 45px; padding: 0 13px; }
textarea { min-height: 122px; padding: 12px 13px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: #77736e; }
input:focus, textarea:focus, select:focus { border-color: rgba(242, 106, 33, .55); box-shadow: 0 0 0 3px rgba(242, 106, 33, .08); }
select { cursor: pointer; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.privacy-note { display: flex; align-items: center; gap: 6px; color: #8f8b85; font-size: 11px; }
.privacy-note svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.generate-button { min-width: 190px; }

.preview-card { position: sticky; top: calc(var(--topbar) + 18px); overflow: hidden; }
.preview-top { min-height: 210px; padding: 24px; background: radial-gradient(circle at 85% 5%, rgba(242, 106, 33, .12), transparent 12rem); }
.preview-symbol { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 28px; color: var(--copper); border: 1px solid var(--copper-line); border-radius: 12px; background: var(--copper-soft); }
.preview-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.preview-top h3 { margin: 0; font-size: 17px; font-weight: 550; letter-spacing: -.03em; }
.preview-top p { margin: 7px 0 0; color: #aaa7a1; font-size: 12px; line-height: 1.5; }
.preview-steps { display: grid; margin: 20px 0 0; counter-reset: step; }
.preview-step { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 9px 0; color: #b0aca5; font-size: 12px; line-height: 1.5; border-top: 1px solid var(--line); }
.preview-step::before { color: var(--copper); font-family: var(--mono); font-size: 9px; counter-increment: step; content: '0' counter(step); }
.preview-foot { padding: 17px 24px; color: #8f8b85; border-top: 1px solid var(--line); font-size: 11px; }

.result-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--copper-line); border-radius: 13px; background: linear-gradient(90deg, rgba(242, 106, 33, .11), rgba(242, 106, 33, .025)); }
.result-banner strong { display: block; font-size: 12px; }
.result-banner p { margin: 4px 0 0; color: #aaa7a1; font-size: 12px; line-height: 1.5; }
.result-stack { display: grid; gap: 10px; }
.result-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.result-meta-item { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #0a0a09; }
.result-meta-item span { display: block; margin-bottom: 6px; color: var(--muted-2); font-family: var(--mono); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.result-meta-item strong { display: block; overflow: hidden; color: #d9d5cf; font-size: 11px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.result-section { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: #10100f; }
.result-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.result-section-head .metric-icon { flex: 0 0 auto; }
.result-section h3 { margin: 0; font-size: 13px; font-weight: 550; }
.result-section ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.result-section li { position: relative; padding-left: 16px; color: #b0aca5; font-size: 12px; line-height: 1.55; }
.result-section li::before { position: absolute; top: .62em; left: 1px; width: 4px; height: 4px; content: ''; border-radius: 50%; background: var(--copper); }
.prompt-output { position: relative; margin-top: 12px; padding: 17px 52px 17px 17px; color: #c0bcb5; font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 10px; background: #080807; }
.prompt-output .button { position: absolute; top: 10px; right: 10px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-field { position: relative; flex: 1; max-width: 620px; }
.search-field svg { position: absolute; z-index: 1; top: 50%; left: 14px; width: 16px; height: 16px; color: #77736e; fill: none; stroke: currentColor; stroke-width: 1.7; transform: translateY(-50%); }
.search-field input { padding-left: 42px; }
.filter-row { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 19px; padding-bottom: 2px; }
.filter-chip { flex: 0 0 auto; height: 35px; padding: 0 14px; color: #c1bdb7; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; background: #11110f; font-size: 11px; font-weight: 550; }
.filter-chip:hover { color: #f0ede8; border-color: var(--line-strong); }
.filter-chip.active { color: #180900; border-color: var(--copper); background: var(--copper-2); }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.library-card { position: relative; display: flex; min-height: 230px; flex-direction: column; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #0f0f0e; transition: transform .17s ease, border-color .17s ease; }
.library-card::after { position: absolute; inset: auto -35px -55px auto; width: 130px; height: 130px; content: ''; opacity: 0; border-radius: 50%; background: rgba(242, 106, 33, .12); filter: blur(24px); transition: opacity .2s ease; }
.library-card:hover { transform: translateY(-2px); border-color: var(--copper-line); }
.library-card:hover::after { opacity: 1; }
.library-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.library-card .metric-icon { width: 36px; height: 36px; }
.card-tag { padding: 3px 6px; color: #80cb99; font-family: var(--mono); font-size: 7px; font-weight: 600; border: 1px solid rgba(84, 200, 121, .23); border-radius: 5px; background: var(--green-soft); text-transform: uppercase; }
.library-card h3 { margin: 19px 0 7px; font-size: 16px; font-weight: 550; letter-spacing: -.03em; }
.library-card p { flex: 1; margin: 0 0 18px; color: #aaa7a1; font-size: 12px; line-height: 1.55; }
.library-card-foot { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 36px; gap: 7px; }
.favorite-toggle.active { color: var(--copper-2); border-color: var(--copper-line); background: var(--copper-soft); }
.empty-state { display: grid; min-height: 300px; place-items: center; padding: 40px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 15px; }
.empty-state .metric-icon { margin: 0 auto 14px; }
.empty-state h3 { margin: 0; font-size: 15px; }
.empty-state p { max-width: 440px; margin: 7px auto 17px; color: #aaa7a1; font-size: 12px; line-height: 1.55; }

.list-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #0d0d0c; }
.list-head, .data-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .7fr) 120px 92px; gap: 15px; align-items: center; }
.list-head { padding: 11px 18px; color: #68645f; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.data-row { min-height: 68px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: 0; }
.data-primary { display: flex; min-width: 0; align-items: center; gap: 11px; }
.data-primary .metric-icon { flex: 0 0 auto; }
.data-primary strong, .data-primary span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.data-primary strong { color: #d6d2cc; font-size: 11px; font-weight: 500; }
.data-primary span { color: #918d87; font-size: 11px; }
.data-meta { color: #9d9993; font-size: 11px; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }

.study-rule { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 16px 18px; color: #b0aca5; border: 1px solid var(--copper-line); border-radius: 11px; background: rgba(242, 106, 33, .055); font-size: 12px; line-height: 1.55; }
.study-rule .metric-icon { flex: 0 0 auto; }
.study-rule strong { display: block; margin-bottom: 3px; color: #efba96; font-size: 13px; font-weight: 600; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }

.quiz-card { padding: 22px; }
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.quiz-progress span { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.quiz-progress-track { flex: 1; height: 4px; border-radius: 99px; background: #262624; }
.quiz-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--copper); }
.quiz-card h3 { margin: 0 0 17px; font-size: 16px; font-weight: 540; line-height: 1.35; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { display: flex; align-items: center; gap: 10px; padding: 12px; color: #b0aca5; text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0a; font-size: 12px; line-height: 1.45; }
.quiz-option:hover { border-color: var(--copper-line); }
.quiz-option.selected { color: #f0ede8; border-color: var(--copper); background: var(--copper-soft); }
.quiz-option.correct { border-color: rgba(84, 200, 121, .45); background: var(--green-soft); }
.quiz-option.wrong { border-color: rgba(237, 106, 90, .45); background: rgba(237, 106, 90, .08); }
.quiz-option b { display: grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; color: var(--copper-2); font-family: var(--mono); font-size: 9px; border: 1px solid var(--copper-line); border-radius: 6px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 12px; font-weight: 550; }
.setting-row span { display: block; margin-top: 3px; color: #97938d; font-size: 11px; line-height: 1.45; }
.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; padding: 0; cursor: pointer; border: 0; border-radius: 99px; background: #2a2a28; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; content: ''; border-radius: 50%; background: #8b8781; transition: transform .18s ease, background .18s ease; }
.switch.on { background: rgba(242, 106, 33, .34); }
.switch.on::after { background: var(--copper-2); transform: translateX(17px); }

.accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0d0d0c; }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item:last-child { border-bottom: 0; }
.accordion-trigger { display: flex; width: 100%; min-height: 55px; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; color: #ccc8c2; text-align: left; cursor: pointer; border: 0; background: transparent; font-size: 11px; }
.accordion-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .15s ease; }
.accordion-item.open .accordion-trigger svg { transform: rotate(180deg); }
.accordion-content { display: none; padding: 0 18px 18px; color: #aaa7a1; font-size: 12px; line-height: 1.55; }
.accordion-item.open .accordion-content { display: block; }

.classic-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 18px; text-decoration: none; border: 1px solid var(--line); border-radius: 13px; background: #0e0e0d; }
.classic-link:hover { border-color: var(--copper-line); }
.classic-link strong { display: block; font-size: 13px; font-weight: 600; }
.classic-link span { color: #aaa7a1; font-size: 11px; }
.classic-link svg { width: 17px; height: 17px; fill: none; stroke: var(--copper); stroke-width: 1.7; }

.command-modal, .onboarding-modal, .library-modal, .session-modal { width: min(620px, calc(100vw - 30px)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: #11110f; box-shadow: 0 35px 110px rgba(0, 0, 0, .75); animation: modalIn .2s ease both; }
.onboarding-modal { width: min(690px, calc(100vw - 30px)); }
.library-modal { width: min(760px, calc(100vw - 30px)); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-root.active { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 15px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 550; letter-spacing: -.03em; }
.modal-head p { margin: 5px 0 0; color: #aaa7a1; font-size: 11px; line-height: 1.5; }
.modal-head .eyebrow { margin: 0 0 6px; color: var(--copper); font-size: 9px; }
.modal-body { max-height: min(70vh, 650px); overflow-y: auto; padding: 22px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-top: 1px solid var(--line); }
.modal-foot small { color: #8f8b85; font-size: 11px; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 24px; }
.onboarding-step { padding: 8px; color: #696660; font-family: var(--mono); font-size: 8px; border-top: 2px solid #292927; }
.onboarding-step.active { color: var(--copper-2); border-color: var(--copper); }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.option-card { min-height: 92px; padding: 13px; color: #8f8b85; text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0a; }
.option-card:hover, .option-card.selected { color: #f2eee8; border-color: var(--copper-line); background: var(--copper-soft); }
.option-card strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; }
.option-card small { color: #97938d; font-size: 11px; line-height: 1.45; }
.prompt-list { display: grid; gap: 10px; }
.prompt-list-item { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0a; }
.prompt-list-item strong { display: block; color: #f0ece6; font-size: 13px; font-weight: 600; line-height: 1.35; }
.prompt-list-item p { margin: 7px 0 0; color: #b0aca5; font-family: var(--font); font-size: 12px; line-height: 1.55; }
.prompt-list-actions { display: flex; align-items: center; gap: 5px; }

.toast-region { position: fixed; z-index: 150; right: 20px; bottom: 20px; display: grid; width: min(350px, calc(100vw - 40px)); gap: 8px; }
.toast { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: #171715; box-shadow: 0 16px 44px rgba(0, 0, 0, .45); animation: toastIn .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.toast .metric-icon { width: 28px; height: 28px; }
.toast strong { display: block; font-size: 12px; font-weight: 600; }
.toast span { display: block; margin-top: 2px; color: #aaa7a1; font-size: 11px; }

.sidebar-scrim { display: none; }

body.compact .main-content { padding-top: 26px; }
body.compact .metric-card { min-height: 104px; }
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

@media (max-width: 1120px) {
  :root { --sidebar: 242px; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-button { display: none; }
  .dashboard-hero { grid-template-columns: 1fr .5fr; }
}

@media (max-width: 900px) {
  :root { --sidebar: 280px; }
  .sidebar { transform: translateX(-101%); transition: transform .24s cubic-bezier(.2, .75, .25, 1); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: grid; }
  .sidebar-scrim { position: fixed; z-index: 45; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(0, 0, 0, .65); transition: opacity .2s ease, visibility .2s ease; }
  .sidebar-scrim.open { visibility: visible; opacity: 1; }
  .workspace { margin-left: 0; }
  .generator-layout, .tool-layout { grid-template-columns: 1fr; }
  .result-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-card { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --topbar: 62px; }
  .topbar { padding: 0 15px; }
  .breadcrumb > span, .breadcrumb > svg { display: none; }
  .profile-button svg { display: none; }
  .main-content { padding: 27px 15px 55px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .page-heading h1 { font-size: 34px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .dashboard-hero { grid-template-columns: 1fr; min-height: auto; padding: 25px 21px; }
  .dashboard-hero h1 { font-size: 38px; }
  .hero-orbit { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 105px; padding: 14px; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-card { min-height: 115px; }
  .quick-card .metric-icon { margin-bottom: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-footer { align-items: stretch; flex-direction: column-reverse; }
  .generate-button { width: 100%; }
  .library-grid { grid-template-columns: 1fr; }
  .library-card { min-height: 208px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .button { width: 100%; }
  .search-field { max-width: none; }
  .list-head { display: none; }
  .data-row { grid-template-columns: 1fr auto; gap: 8px; padding: 14px; }
  .data-row > .data-meta { display: none; }
  .row-actions { align-self: center; }
  .result-banner { align-items: flex-start; flex-direction: column; }
  .result-banner .heading-actions { width: 100%; }
  .result-banner .button { flex: 1; }
  .onboarding-steps, .option-grid { grid-template-columns: 1fr; }
  .modal-foot { align-items: stretch; flex-direction: column; }
  .modal-foot .heading-actions { width: 100%; }
  .modal-foot .button { flex: 1; }
  .prompt-list-item { grid-template-columns: 1fr; }
  .prompt-list-actions { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .result-meta-grid { grid-template-columns: 1fr; }
  .page-heading h1 { font-size: 31px; }
  .dashboard-hero h1 { font-size: 34px; }
}
