/* ═══════════════════════════════════════════
   UNDRIFT — undrift-docs.css v1.3
   Shared styles for doc and feedback pages.
   Referenced by: undrift-user-guide.html,
                  undrift-dev-docs.html,
                  undrift-feedback.html
═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --brand:          #1A6BFF;
  --brand-hover:    #0F55D4;
  --brand-subtle:   #EBF1FF;
  --brand-border:   #C0D4FF;
  --success:        #16A34A;
  --success-subtle: #F0FDF4;
  --success-border: #BBF7D0;
  --warning:        #D97706;
  --warning-subtle: #FFFBEB;
  --warning-border: #FDE68A;
  --danger:         #DC2626;
  --danger-subtle:  #FEF2F2;
  --danger-border:  #FECACA;
  --yellow:         #EAB308;
  --yellow-subtle:  #FEFCE8;
  --yellow-border:  #FEF08A;
  --purple:         #7C3AED;
  --purple-subtle:  #F5F3FF;
  --purple-border:  #DDD6FE;
  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="light"] {
  --bg:        #F4F6F9;
  --surface:   #FFFFFF;
  --surface-2: #F8F9FB;
  --surface-3: #EFF1F5;
  --border:    #E4E7EC;
  --border-2:  #CDD2DA;
  --text-1:    #0F1928;
  --text-2:    #3D4A5C;
  --text-3:    #6B7A8D;
  --text-4:    #9BA5B2;
  --shadow-sm: 0 1px 3px rgba(15,25,40,.07), 0 1px 2px rgba(15,25,40,.04);
  --shadow:    0 4px 16px rgba(15,25,40,.08), 0 1px 4px rgba(15,25,40,.05);
  --brand-name-color: #0E1927;
}

[data-theme="dark"] {
  --bg:        #0D1117;
  --surface:   #161B22;
  --surface-2: #1C2330;
  --surface-3: #212B3C;
  --border:    #2A3444;
  --border-2:  #374356;
  --text-1:    #E6EDF3;
  --text-2:    #B0BDCC;
  --text-3:    #8899AA;
  --text-4:    #6B7A8D;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow:    0 4px 16px rgba(0,0,0,.45);
  --brand-name-color: #E6EDF3;
  --brand:          #7eb8ff;
  --brand-subtle:   rgba(126,184,255,0.12);
  --brand-border:   rgba(126,184,255,0.25);
  --yellow-subtle:  #1c1600;
  --yellow-border:  #854d0e;
}

/* ── DARK MODE OVERRIDES ── */
[data-theme="dark"] .dl-btn {
  background: #1A6BFF;
}
[data-theme="dark"] .dl-btn:hover {
  background: #0F55D4;
}

/* ── RESET + BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text-1); line-height: 1.6; transition: background .2s, color .2s; }

/* ── BETA RIBBON ── */
.beta-ribbon { position: fixed; top: 14px; left: -28px; width: 110px; text-align: center; padding: 5px 0; background: #DC2626; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-45deg); z-index: 9999; pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

/* ── BUTTONS ── */
.theme-btn { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 12px; color: var(--text-3); font-family: inherit; text-decoration: none; transition: all .15s; white-space: nowrap; }
.theme-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-subtle); }
.theme-btn:active { background: var(--brand); color: #fff; border-color: var(--brand); }
.theme-btn.feedback-link:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-subtle); }
.theme-btn.feedback-link:active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ══════════════════════════════════════
   DOC PAGES (user guide + dev docs)
   Uses: .nav, .nav-brand, .nav-brand-name,
         .nav-brand-sub, .nav-section,
         .nav-footer, .nav-link (.active),
         .main, .dl-bar, .dl-btn, .hero
══════════════════════════════════════ */

/* Sidebar nav */
.nav { position: fixed; top: 0; left: 0; bottom: 0; width: 240px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; padding: 1.25rem 0; display: flex; flex-direction: column; z-index: 100; }
.nav-brand { padding: .75rem 1.25rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.nav-brand-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.nav-brand-sub { font-size: 11px; color: var(--text-4); margin-top: 2px; }
.nav-section { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); padding: .75rem 1.25rem .35rem; }
.nav a { display: block; padding: .45rem 1.25rem; font-size: 13px; color: var(--text-3); text-decoration: none; border-left: 2px solid transparent; transition: all .12s; }
.nav a:hover { color: var(--text-1); background: var(--surface-2); }
.nav a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-subtle); font-weight: 500; }
.nav-footer { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

/* Main content */
.main { margin-left: 240px; padding: 2.5rem 3rem 5rem; max-width: 960px; }

/* Download bar */
.dl-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--brand-subtle); border: 1px solid var(--brand-border); border-radius: var(--radius-lg); padding: .875rem 1.25rem; margin-bottom: 2rem; flex-wrap: wrap; }
.dl-bar p { font-size: 13px; color: var(--text-2); margin: 0; }
.dl-btn { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--brand); color: #fff; border-radius: var(--radius); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s; }
.dl-btn:hover { background: #0F55D4; }
.dl-btn svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

/* Hero */
.hero { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--text-1); margin-bottom: .5rem; }
.hero h1 span { color: var(--brand); }
.hero p { font-size: 14px; color: var(--text-3); max-width: 600px; }

/* Typography */
h2 { font-size: 18px; font-weight: 700; color: var(--text-1); margin: 2rem 0 .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 14px; font-weight: 700; color: var(--text-2); margin: 1.5rem 0 .5rem; text-transform: uppercase; letter-spacing: .05em; }
p  { font-size: 13px; color: var(--text-2); margin-bottom: .75rem; line-height: 1.7; }
code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--brand); }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: .75rem 0 1rem; }
pre code { background: none; border: none; padding: 0; color: var(--text-1); font-size: 12px; }

/* Info / warn cards */
.info-card { background: var(--brand-subtle); border: 1px solid var(--brand-border); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: .875rem 1rem; font-size: 13px; color: var(--text-2); margin: .75rem 0 1rem; line-height: 1.6; }
.warn-card { background: #fffbeb; border: 1px solid #fde68a; border-left: 3px solid var(--warning); border-radius: var(--radius); padding: .875rem 1rem; font-size: 13px; color: #78350f; margin: .75rem 0 1rem; line-height: 1.6; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin: .75rem 0 1.5rem; }
th { text-align: left; padding: .6rem .875rem; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); border-bottom: 1px solid var(--border); }
td { padding: .6rem .875rem; color: var(--text-2); border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.55; }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--surface-2); }
td.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; color: var(--brand); }

/* Doc footer */
.doc-footer { margin-left: 240px; padding: 1.5rem 3rem; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ══════════════════════════════════════
   FEEDBACK PAGE
   Uses: .topbar, .brand, .brand-icon,
         .brand-name, .brand-sub, .wrapper
══════════════════════════════════════ */

/* Topbar — constrained to match content width */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); height: 52px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; padding: 0 calc((100% - 640px) / 2); }
@media (max-width: 680px) { .topbar { padding: 0 1.5rem; } }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--text-1); letter-spacing: -.02em; }
.brand-sub  { font-size: 11px; color: var(--text-4); }

/* Shared app footer — used on all static pages */
.app-footer {
  position: fixed; bottom: 0; left: 0; right: 0; height: 36px;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-4); z-index: 150;
  letter-spacing: .01em; gap: 16px;
}
.app-footer a { color: var(--text-4); text-decoration: none; }
.app-footer a:hover { color: var(--brand); }

/* Content wrapper */
.wrapper { max-width: 640px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { display: none; }
  .main, .doc-footer { margin-left: 0; padding-left: 1.25rem; padding-right: 1.25rem; }
}

