/* ============================================================
   Decision Oracle — Frontend Stylesheet
   Aesthetic: Dark Academia Luxury / Oxford-Inspired
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
.do-wrapper {
  --do-bg:           #0d0f1a;
  --do-surface:      #131626;
  --do-surface2:     #1a1e35;
  --do-surface3:     #22283d;
  --do-border:       rgba(255,255,255,.08);
  --do-border-hover: rgba(255,255,255,.18);
  --do-gold:         #c9a84c;
  --do-gold-light:   #e8c96a;
  --do-gold-dim:     rgba(201,168,76,.15);
  --do-text:         #e8e6f0;
  --do-text-dim:     rgba(232,230,240,.55);
  --do-text-faint:   rgba(232,230,240,.3);
  --do-accent:       #6c63ff;
  --do-accent2:      #ff6b9d;
  --do-success:      #4ade80;
  --do-warn:         #fbbf24;
  --do-error:        #f87171;
  --do-radius:       16px;
  --do-radius-sm:    8px;
  --do-shadow:       0 8px 40px rgba(0,0,0,.5);
  --do-shadow-card:  0 4px 24px rgba(0,0,0,.35);
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--do-text);
  background: var(--do-bg);
  box-sizing: border-box;
}
.do-wrapper *, .do-wrapper *::before, .do-wrapper *::after { box-sizing: inherit; }

/* ── HERO ────────────────────────────────────────────────────── */
.do-hero {
  position: relative;
  text-align: center;
  padding: 72px 24px 60px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,99,255,.18) 0%, transparent 70%);
  border-bottom: 1px solid var(--do-border);
}
.do-hero-orb {
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
  pointer-events: none;
}
.do-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--do-gold-dim); border: 1px solid rgba(201,168,76,.3);
  color: var(--do-gold); font-size: .75rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; padding: 6px 16px; border-radius: 100px;
  margin-bottom: 24px;
}
.do-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--do-gold);
  animation: do-pulse 2s infinite;
}
@keyframes do-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }
.do-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900;
  line-height: 1.1; margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 0%, var(--do-gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.do-hero-sub {
  color: var(--do-text-dim); font-size: 1.1rem; font-weight: 300; margin: 0;
  letter-spacing: .02em;
}

/* ── MAIN GRID ───────────────────────────────────────────────── */
.do-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 680px;
  gap: 0;
}
@media (max-width: 900px) {
  .do-main { grid-template-columns: 1fr; }
}

/* ── FORM PANEL ──────────────────────────────────────────────── */
.do-form-panel {
  padding: 40px 36px;
  border-right: 1px solid var(--do-border);
  display: flex; flex-direction: column; gap: 28px;
}
.do-form-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; margin: 0 0 6px;
}
.do-form-header p { color: var(--do-text-dim); font-size: .9rem; margin: 0; }

/* ── STEPS ───────────────────────────────────────────────────── */
.do-step-label {
  display: flex; align-items: center; gap: 12px;
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--do-gold); margin-bottom: 16px;
}
.do-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--do-gold-dim); border: 1px solid rgba(201,168,76,.4);
  display: grid; place-items: center; font-size: .75rem; flex-shrink: 0;
}
.do-step { animation: do-fadeIn .35s ease; }
@keyframes do-fadeIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }

/* ── CATEGORY GRID ───────────────────────────────────────────── */
.do-category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 600px) { .do-category-grid { grid-template-columns: repeat(2, 1fr); } }
.do-cat-btn {
  background: var(--do-surface2);
  border: 1px solid var(--do-border);
  border-radius: var(--do-radius-sm);
  padding: 14px 10px; cursor: pointer; text-align: center;
  transition: all .2s; display: flex; flex-direction: column; gap: 4px; align-items: center;
  color: var(--do-text);
}
.do-cat-btn:hover {
  border-color: var(--do-gold); background: var(--do-gold-dim);
  transform: translateY(-2px); box-shadow: var(--do-shadow-card);
}
.do-cat-btn.active {
  border-color: var(--do-gold); background: var(--do-gold-dim);
  box-shadow: 0 0 0 2px rgba(201,168,76,.3);
}
.do-cat-icon { font-size: 1.4rem; }
.do-cat-label { font-size: .85rem; font-weight: 600; }
.do-cat-desc { font-size: .7rem; color: var(--do-text-dim); display: none; }

/* ── FRAMEWORK GRID ──────────────────────────────────────────── */
.do-framework-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.do-fw-btn {
  background: var(--do-surface2);
  border: 1px solid var(--do-border);
  border-radius: var(--do-radius-sm);
  padding: 14px 14px; cursor: pointer; text-align: left;
  transition: all .2s; color: var(--do-text);
}
.do-fw-btn:hover { border-color: var(--do-accent); background: rgba(108,99,255,.08); transform: translateY(-2px); }
.do-fw-btn.active { border-color: var(--do-accent); background: rgba(108,99,255,.15); box-shadow: 0 0 0 2px rgba(108,99,255,.25); }
.do-fw-icon { font-size: 1.3rem; display: block; margin-bottom: 6px; }
.do-fw-name { font-size: .82rem; font-weight: 600; display: block; margin-bottom: 3px; }
.do-fw-uni { font-size: .7rem; color: var(--do-gold); display: block; }

/* ── FORM FIELDS ─────────────────────────────────────────────── */
.do-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.do-field label { font-size: .82rem; font-weight: 500; color: var(--do-text-dim); }
.do-req { color: var(--do-gold); }
.do-field input, .do-field textarea, .do-field select {
  background: var(--do-surface2); border: 1px solid var(--do-border);
  border-radius: var(--do-radius-sm); color: var(--do-text);
  padding: 12px 14px; font-family: inherit; font-size: .9rem;
  transition: border-color .2s; resize: vertical; width: 100%;
}
.do-field input:focus, .do-field textarea:focus {
  outline: none; border-color: var(--do-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1);
}
.do-field input::placeholder, .do-field textarea::placeholder { color: var(--do-text-faint); }
.do-char-count { font-size: .72rem; color: var(--do-text-faint); text-align: right; margin-top: 2px; }
.do-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width:600px) { .do-field-row { grid-template-columns: 1fr; } }

/* ── URGENCY ─────────────────────────────────────────────────── */
.do-urgency-row { display: flex; gap: 8px; flex-wrap: wrap; }
.do-urgency-btn {
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--do-border);
  background: var(--do-surface2); color: var(--do-text); font-size: .8rem;
  cursor: pointer; transition: all .2s;
}
.do-urgency-btn:hover { border-color: var(--do-border-hover); }
.do-urgency-btn.active { border-color: var(--do-gold); background: var(--do-gold-dim); color: var(--do-gold); }

/* ── STEP NAV ────────────────────────────────────────────────── */
.do-step-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--do-border);
}
.do-step-dots { display: flex; gap: 6px; }
.do-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--do-surface3); transition: all .3s;
}
.do-dot.active { background: var(--do-gold); width: 24px; border-radius: 4px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.do-btn-primary {
  width: 100%; padding: 16px 24px;
  background: linear-gradient(135deg, var(--do-gold) 0%, #b8920a 100%);
  color: #0d0f1a; border: none; border-radius: var(--do-radius-sm);
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: all .25s; letter-spacing: .02em;
}
.do-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,.35); filter: brightness(1.1); }
.do-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.do-btn-primary .do-btn-icon { font-size: 1.15rem; }
.do-btn-primary .do-btn-arrow { margin-left: auto; transition: transform .2s; }
.do-btn-primary:hover:not(:disabled) .do-btn-arrow { transform: translateX(4px); }

.do-btn-secondary {
  padding: 10px 20px; background: var(--do-surface2);
  border: 1px solid var(--do-border-hover); border-radius: var(--do-radius-sm);
  color: var(--do-text); font-family: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.do-btn-secondary:hover { border-color: var(--do-gold); color: var(--do-gold); }

.do-btn-ghost {
  padding: 10px 20px; background: transparent;
  border: 1px solid var(--do-border); border-radius: var(--do-radius-sm);
  color: var(--do-text-dim); font-family: inherit; font-size: .88rem;
  cursor: pointer; transition: all .2s;
}
.do-btn-ghost:hover { border-color: var(--do-border-hover); color: var(--do-text); }
.do-btn-sm { padding: 7px 14px; font-size: .8rem; }

/* ── RESULT PANEL ────────────────────────────────────────────── */
.do-result-panel {
  padding: 40px 36px;
  background: linear-gradient(180deg, rgba(108,99,255,.04) 0%, transparent 60%);
  display: flex; flex-direction: column;
}

/* Idle */
.do-result-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; gap: 20px; padding: 40px 20px; }
.do-idle-graphic { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.do-idle-ring {
  position: absolute; border-radius: 50%; border: 1px solid;
  animation: do-spin linear infinite;
}
.do-idle-ring--1 { inset: 0; border-color: rgba(201,168,76,.25); animation-duration: 8s; }
.do-idle-ring--2 { inset: 15px; border-color: rgba(108,99,255,.25); animation-duration: 12s; animation-direction: reverse; }
.do-idle-ring--3 { inset: 30px; border-color: rgba(255,107,157,.2); animation-duration: 6s; }
@keyframes do-spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.do-idle-icon { font-size: 2rem; position: relative; z-index: 1; }
.do-result-idle h3 { font-family: 'Playfair Display',serif; font-size: 1.4rem; margin: 0; }
.do-result-idle p { color: var(--do-text-dim); font-size: .9rem; margin: 0; max-width: 320px; }
.do-feature-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.do-feature { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--do-text-dim); }
.do-feature span { font-size: 1.1rem; }

/* Loading */
.do-result-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 24px; padding: 40px; text-align: center; }
.do-loader-anim { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.do-loader-brain { font-size: 3rem; animation: do-breathe 1.5s ease-in-out infinite; }
@keyframes do-breathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.do-loader-dots { display: flex; gap: 6px; }
.do-loader-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--do-gold);
  animation: do-bounce .8s ease infinite;
}
.do-loader-dots span:nth-child(2) { animation-delay: .15s; }
.do-loader-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes do-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.do-result-loading h3 { font-family: 'Playfair Display',serif; margin: 0; }
.do-loading-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.do-loading-step { padding: 10px 16px; border-radius: var(--do-radius-sm); background: var(--do-surface2); border: 1px solid var(--do-border); font-size: .85rem; color: var(--do-text-dim); transition: all .4s; }
.do-loading-step.active { border-color: var(--do-gold); color: var(--do-text); background: var(--do-gold-dim); }

/* Result content */
.do-result-content { display: flex; flex-direction: column; gap: 20px; animation: do-fadeIn .5s ease; }
.do-result-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.do-result-meta { display: flex; align-items: center; gap: 8px; }
.do-result-badge, .do-result-fw {
  padding: 4px 12px; border-radius: 100px; font-size: .73rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
}
.do-result-badge { background: var(--do-gold-dim); border: 1px solid rgba(201,168,76,.3); color: var(--do-gold); }
.do-result-fw { background: rgba(108,99,255,.15); border: 1px solid rgba(108,99,255,.3); color: #a89cff; }
.do-result-actions { display: flex; gap: 8px; }
.do-action-btn {
  padding: 7px 14px; border-radius: var(--do-radius-sm); border: 1px solid var(--do-border);
  background: var(--do-surface2); color: var(--do-text-dim); font-size: .78rem;
  cursor: pointer; transition: all .2s;
}
.do-action-btn:hover { border-color: var(--do-border-hover); color: var(--do-text); }

/* Result body — AI response rendering */
.do-result-body {
  background: var(--do-surface);
  border: 1px solid var(--do-border);
  border-radius: var(--do-radius);
  padding: 28px 32px;
  line-height: 1.75;
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--do-surface3) transparent;
}
.do-result-body::-webkit-scrollbar { width: 5px; }
.do-result-body::-webkit-scrollbar-track { background: transparent; }
.do-result-body::-webkit-scrollbar-thumb { background: var(--do-surface3); border-radius: 10px; }
.do-result-body h1 { font-family: 'Playfair Display',serif; font-size: 1.6rem; margin: 0 0 16px; color: var(--do-text); }
.do-result-body h2 { font-family: 'Playfair Display',serif; font-size: 1.2rem; margin: 28px 0 12px; color: var(--do-gold); border-bottom: 1px solid var(--do-border); padding-bottom: 6px; }
.do-result-body h3 { font-size: 1rem; font-weight: 600; margin: 20px 0 8px; color: var(--do-text); }
.do-result-body p { margin: 0 0 14px; color: var(--do-text-dim); }
.do-result-body strong { color: var(--do-text); font-weight: 600; }
.do-result-body em { color: var(--do-gold-light); font-style: italic; }
.do-result-body ul, .do-result-body ol { margin: 0 0 16px 20px; color: var(--do-text-dim); }
.do-result-body li { margin-bottom: 6px; }
.do-result-body hr { border: none; border-top: 1px solid var(--do-border); margin: 24px 0; }
.do-result-body code { background: var(--do-surface2); padding: 2px 7px; border-radius: 4px; font-family: 'DM Mono', monospace; font-size: .85em; color: var(--do-gold-light); }

/* Result footer */
.do-result-footer { display: flex; flex-direction: column; gap: 16px; }
.do-tokens { font-size: .75rem; color: var(--do-text-faint); font-family: 'DM Mono',monospace; }

/* Feedback */
.do-feedback { background: var(--do-surface2); border: 1px solid var(--do-border); border-radius: var(--do-radius-sm); padding: 20px; }
.do-feedback-label { font-size: .85rem; font-weight: 500; margin: 0 0 12px; }
.do-stars { display: flex; gap: 6px; margin-bottom: 12px; }
.do-star { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--do-border); transition: color .15s, transform .15s; padding: 0; }
.do-star:hover, .do-star.active { color: var(--do-gold); transform: scale(1.2); }
.do-feedback textarea { background: var(--do-surface); border: 1px solid var(--do-border); border-radius: var(--do-radius-sm); color: var(--do-text); padding: 10px 12px; font-family: inherit; font-size: .85rem; width: 100%; resize: none; margin-bottom: 10px; }

/* Error state */
.do-result-error { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 16px; text-align: center; padding: 40px; }
.do-error-icon { font-size: 3rem; }
.do-result-error h3 { font-family: 'Playfair Display',serif; margin: 0; }
.do-result-error p { color: var(--do-text-dim); font-size: .9rem; margin: 0; }

/* Loading inline */
.do-loading-inline { color: var(--do-text-dim); font-size: .9rem; padding: 20px 0; animation: do-pulse 1.5s infinite; }

/* ── HISTORY ─────────────────────────────────────────────────── */
.do-history-wrapper { padding: 0; }
.do-history-header { display: flex; align-items: center; justify-content: space-between; padding: 32px 36px 24px; border-bottom: 1px solid var(--do-border); flex-wrap: wrap; gap: 16px; }
.do-history-header h2 { font-family: 'Playfair Display',serif; margin: 0; font-size: 1.6rem; }
.do-history-controls { display: flex; gap: 10px; }
.do-history-search, .do-history-cat {
  padding: 10px 14px; border-radius: var(--do-radius-sm);
  background: var(--do-surface2); border: 1px solid var(--do-border);
  color: var(--do-text); font-family: inherit; font-size: .88rem;
}
.do-history-search:focus, .do-history-cat:focus { outline: none; border-color: var(--do-gold); }
.do-history-list { padding: 24px 36px; display: flex; flex-direction: column; gap: 12px; }
.do-history-card {
  background: var(--do-surface2); border: 1px solid var(--do-border); border-radius: var(--do-radius);
  padding: 20px 24px; cursor: pointer; transition: all .2s; display: flex; align-items: flex-start; gap: 16px;
}
.do-history-card:hover { border-color: var(--do-gold); transform: translateY(-1px); box-shadow: var(--do-shadow-card); }
.do-history-icon { font-size: 1.6rem; flex-shrink: 0; }
.do-history-info { flex: 1; min-width: 0; }
.do-history-info h4 { margin: 0 0 6px; font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.do-history-info p { margin: 0 0 10px; font-size: .82rem; color: var(--do-text-dim); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.do-history-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.do-history-rating { flex-shrink: 0; font-size: .85rem; color: var(--do-gold); }

/* Badges */
.do-badge {
  display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.do-badge-business  { background: rgba(108,99,255,.15); color: #a89cff; border: 1px solid rgba(108,99,255,.3); }
.do-badge-personal  { background: rgba(255,107,157,.1); color: #ff8eb9; border: 1px solid rgba(255,107,157,.25); }
.do-badge-financial { background: rgba(74,222,128,.1);  color: #4ade80; border: 1px solid rgba(74,222,128,.25); }
.do-badge-career    { background: rgba(251,191,36,.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.do-badge-home      { background: rgba(56,189,248,.1);  color: #38bdf8; border: 1px solid rgba(56,189,248,.25); }
.do-badge-health    { background: rgba(251,146,60,.1);  color: #fb923c; border: 1px solid rgba(251,146,60,.25); }
.do-badge-legal     { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.25); }
.do-badge-other     { background: rgba(201,168,76,.1);  color: var(--do-gold); border: 1px solid rgba(201,168,76,.25); }

/* Modal */
.do-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.do-modal {
  background: var(--do-surface); border: 1px solid var(--do-border);
  border-radius: var(--do-radius); width: 100%; max-width: 800px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--do-shadow);
}
.do-modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 28px; border-bottom: 1px solid var(--do-border); }
.do-modal-header h3 { font-family: 'Playfair Display',serif; margin: 0 0 8px; }
.do-modal-meta { display: flex; gap: 8px; }
.do-modal-close { background: none; border: none; font-size: 1.2rem; color: var(--do-text-dim); cursor: pointer; padding: 4px; }
.do-modal-body { padding: 28px; overflow-y: auto; }

/* Login notice */
.do-login-notice {
  padding: 24px; background: var(--do-surface2); border: 1px solid var(--do-border);
  border-radius: var(--do-radius); text-align: center;
}
.do-login-notice a { color: var(--do-gold); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .do-form-panel { border-right: none; border-bottom: 1px solid var(--do-border); }
  .do-result-panel { padding: 32px 24px; }
}
@media (max-width: 600px) {
  .do-hero { padding: 48px 20px 40px; }
  .do-form-panel { padding: 28px 20px; }
  .do-result-body { padding: 20px; }
  .do-history-header { padding: 24px 20px 16px; }
  .do-history-list { padding: 16px 20px; }
}

/* ── PRINT ───────────────────────────────────────────────────── */
@media print {
  .do-form-panel, .do-hero, .do-result-actions, .do-feedback, .do-result-footer .do-tokens { display: none !important; }
  .do-main { grid-template-columns: 1fr; }
  .do-result-panel { padding: 0; }
  .do-result-body { max-height: none; border: none; }
  .do-wrapper { background: white; color: black; }
}

/* ── TABS ────────────────────────────────────────────────────── */
.do-tabs {
  display: flex;
  border-bottom: 1px solid var(--do-border);
  background: var(--do-surface);
  padding: 0 24px;
}
.do-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 24px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--do-text-dim); font-family: inherit; font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  margin-bottom: -1px;
}
.do-tab:hover { color: var(--do-text); }
.do-tab.active { color: var(--do-gold); border-bottom-color: var(--do-gold); }
.do-tab span:first-child { font-size: 1.1rem; }
.do-tab-count {
  background: var(--do-gold-dim); border: 1px solid rgba(201,168,76,.3);
  color: var(--do-gold); font-size: .7rem; font-weight: 700;
  padding: 1px 7px; border-radius: 100px; min-width: 20px; text-align: center;
}

/* ── SAVED NOTICE ────────────────────────────────────────────── */
.do-result-saved-notice {
  display: flex; align-items: center; gap: 8px;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.2);
  border-radius: var(--do-radius-sm); padding: 10px 16px;
  font-size: .85rem; color: var(--do-success);
  animation: do-fadeIn .4s ease;
}
.do-link-btn {
  background: none; border: none; color: var(--do-gold);
  font-family: inherit; font-size: inherit; cursor: pointer;
  text-decoration: underline; padding: 0;
}
.do-link-btn:hover { color: var(--do-gold-light); }

/* ── HISTORY ENHANCEMENTS ────────────────────────────────────── */
.do-history-card {
  position: relative;
}
.do-history-right {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between; gap: 8px; flex-shrink: 0;
}
.do-history-arrow {
  color: var(--do-text-faint); font-size: 1.1rem;
  transition: transform .2s, color .2s;
}
.do-history-card:hover .do-history-arrow {
  transform: translateX(4px); color: var(--do-gold);
}
.do-badge-fw {
  background: rgba(108,99,255,.12); color: #a89cff;
  border: 1px solid rgba(108,99,255,.25);
}
.do-badge-date {
  background: rgba(255,255,255,.05); color: var(--do-text-dim);
  border: 1px solid var(--do-border);
}

/* History empty state */
.do-history-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 80px 24px; gap: 16px;
}
.do-history-empty-icon { font-size: 3rem; }
.do-history-empty h3 {
  font-family: 'Playfair Display', serif;
  margin: 0; font-size: 1.3rem;
}
.do-history-empty p { color: var(--do-text-dim); font-size: .9rem; margin: 0; }

/* Modal problem statement */
.do-modal-problem {
  margin-bottom: 24px; padding: 16px 20px;
  background: var(--do-surface2); border-radius: 10px;
  border: 1px solid var(--do-border);
}
.do-modal-problem strong {
  font-size: .78rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--do-text-dim);
  display: block; margin-bottom: 8px;
}
.do-modal-problem p { margin: 0; color: var(--do-text); line-height: 1.65; }
