/* ============================================================
   DEWEY v2 — Master Design System
   dewey.css
   Import this file on every page.
   Last updated: 2025
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Jost:wght@300;400;500;600&display=swap');

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* Palette */
  --paper:        #F5EFE4;
  --paper-warm:   #EDE4D3;
  --paper-deep:   #DDD0B8;
  --cream:        #FAF6EF;
  --ink:          #1E1610;
  --ink-mid:      #4A3C2C;
  --ink-soft:     #7A6A54;
  --ink-ghost:    #B5A68E;

  /* Brand colours */
  --forest:       #2C4A35;
  --forest-mid:   #3D6147;
  --forest-lt:    #EBF2EC;
  --forest-glow:  rgba(44, 74, 53, 0.12);

  --burgundy:     #6B2737;
  --burg-lt:      #F8EDEE;
  --burg-glow:    rgba(107, 39, 55, 0.12);

  --mustard:      #8B6914;
  --must-lt:      #F9F2E0;

  --slate:        #4A6B82;
  --slate-lt:     #EDF2F6;
  --slate-glow:   rgba(74, 107, 130, 0.12);

  --plum:         #7A5C8A;
  --plum-lt:      #F3EEF7;

  /* Shadows */
  --shadow-xs:    0 1px 4px rgba(30, 22, 16, 0.05);
  --shadow-sm:    0 2px 8px rgba(30, 22, 16, 0.07);
  --shadow-md:    0 4px 20px rgba(30, 22, 16, 0.10);
  --shadow-lg:    0 8px 40px rgba(30, 22, 16, 0.13);
  --shadow-xl:    0 16px 64px rgba(30, 22, 16, 0.16);

  /* Border radius */
  --r-pill:       100px;
  --r-card:       20px;
  --r-md:         12px;
  --r-sm:         8px;

  /* Typography scale */
  --text-xs:      11px;
  --text-sm:      12px;
  --text-base:    14px;
  --text-md:      16px;
  --text-lg:      18px;
  --text-xl:      22px;
  --text-2xl:     28px;
  --text-3xl:     36px;
  --text-4xl:     48px;
  --text-hero:    64px;

  /* Layout */
  --sidebar-w:    252px;
  --topbar-h:     66px;
  --content-pad:  44px;
  --max-content:  1200px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain texture — applied to body via pseudo-element */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
.font-display { font-family: 'Cormorant Garamond', serif; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-md    { font-size: var(--text-md); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }

.text-ink       { color: var(--ink); }
.text-ink-mid   { color: var(--ink-mid); }
.text-ink-soft  { color: var(--ink-soft); }
.text-ink-ghost { color: var(--ink-ghost); }
.text-forest    { color: var(--forest); }
.text-burgundy  { color: var(--burgundy); }
.text-mustard   { color: var(--mustard); }
.text-slate     { color: var(--slate); }
.text-paper     { color: var(--paper); }

.font-light   { font-weight: 300; }
.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semi    { font-weight: 600; }
.font-bold    { font-weight: 700; }
.italic       { font-style: italic; }

.tracking-wide  { letter-spacing: 0.06em; }
.tracking-wider { letter-spacing: 0.12em; }
.tracking-widest{ letter-spacing: 0.2em; }
.uppercase      { text-transform: uppercase; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }

/* Eyebrow label */
.eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mustard);
}

/* ============================================================
   4. LAYOUT — APP SHELL
   ============================================================ */

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--forest);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 32px rgba(44, 74, 53, 0.22);
}

.sidebar-logo {
  padding: 32px 28px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  font-style: italic;
  color: var(--paper);
  line-height: 1;
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 239, 228, 0.42);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-pill);
  transition: background 0.15s, color 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(245,239,228,0.55);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.01em;
  min-height: 40px;
  box-sizing: border-box;
}
.nav-item:hover  { background: rgba(255,255,255,0.08); color: rgba(245,239,228,0.85); }
.nav-item.active { background: rgba(245,239,228,0.12); color: var(--paper); font-weight: 600; }

/* Single source of truth for nav dots — suppress all pseudo-element approaches */
.nav-item::before,
.nav-item::after,
.sidebar-nav .nav-item::before,
.sidebar-nav .nav-item::after,
.sidebar-nav .nav-item.active::before,
.sidebar-nav .nav-item.active::after { display: none !important; }

/* Nav dot — the only indicator, never changes size so no layout shift */
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(245,239,228,0.22);
  flex-shrink: 0;
  transition: background 0.15s, box-shadow 0.15s;
}
.nav-item:hover  .nav-dot { background: rgba(245,239,228,0.45); }
.nav-item.active .nav-dot {
  background: var(--mustard);
  box-shadow: 0 0 0 2px rgba(139,105,20,0.25);
}

/* Hide legacy emoji icon divs everywhere */
.nav-icon { display: none !important; }

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--mustard);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(255,255,255,0.09);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.nav-item.active .nav-icon { background: rgba(245,239,228,0.16); }

.nav-badge {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

.badge-mustard { background: var(--mustard); color: var(--must-lt); }
.badge-paper   { background: rgba(245,239,228,0.15); color: rgba(245,239,228,0.5); font-size: 9px; }

.sidebar-nav .nav-item:last-child {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}


/* Main area */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  background: var(--cream);
  border-bottom: 1px solid var(--paper-deep);
  padding: 0 var(--content-pad);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-stat {
  background: var(--paper-warm);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-stat strong { font-weight: 600; color: var(--forest); font-size: 14px; }

/* Page content wrapper */
.content {
  padding: var(--content-pad);
  flex: 1;
  animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: var(--paper);
  box-shadow: 0 3px 14px var(--forest-glow);
}
.btn-primary:hover {
  background: var(--forest-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44,74,53,0.22);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--cream);
  color: var(--ink-mid);
  border: 1.5px solid var(--paper-deep);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--paper-warm); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn-ghost:hover { background: var(--forest-lt); }

.btn-danger {
  background: var(--burg-lt);
  color: var(--burgundy);
  border: 1.5px solid rgba(107,39,55,0.2);
}
.btn-danger:hover { background: #F0D8DA; transform: translateY(-1px); }

.btn-white {
  background: var(--paper);
  color: var(--forest);
  border: 1.5px solid var(--paper);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { background: var(--cream); transform: translateY(-1px); }

.btn-google {
  background: #fff;
  color: #3C4043;
  border: 1.5px solid #DADCE0;
  box-shadow: var(--shadow-sm);
  gap: 10px;
  padding: 11px 24px;
}
.btn-google:hover { background: #F8F9FA; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-google .google-g {
  width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* Sizes */
.btn-xs  { padding: 5px 12px;  font-size: 11px; }
.btn-sm  { padding: 7px 16px;  font-size: 12px; }
.btn-lg  { padding: 14px 30px; font-size: 15px; }
.btn-xl  { padding: 17px 40px; font-size: 16px; letter-spacing: 0.04em; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card-body   { padding: 26px 30px; }
.card-header {
  padding: 18px 30px 14px;
  border-bottom: 1px solid var(--paper-warm);
  display: flex; align-items: center; justify-content: space-between;
}
.card-footer {
  padding: 14px 30px 18px;
  border-top: 1px solid var(--paper-warm);
  background: var(--paper);
}

/* Stat card */
.stat-card {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card-featured {
  background: linear-gradient(135deg, var(--forest) 0%, #1E3828 100%);
  border-color: var(--forest);
  box-shadow: 0 4px 20px var(--forest-glow);
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card-featured .stat-num { color: var(--paper); }
.stat-lbl {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}
.stat-card-featured .stat-lbl { color: rgba(245,239,228,0.45); }

/* ============================================================
   7. PILLS & BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.pill-forest  { background: var(--forest-lt);  color: var(--forest); }
.pill-slate   { background: var(--slate-lt);   color: var(--slate); }
.pill-must    { background: var(--must-lt);    color: var(--mustard); }
.pill-burg    { background: var(--burg-lt);    color: var(--burgundy); }
.pill-plum    { background: var(--plum-lt);    color: var(--plum); }
.pill-paper   { background: var(--paper-warm); color: var(--ink-soft); border: 1px solid var(--paper-deep); }
.pill-dark    { background: var(--ink);        color: var(--paper); }

/* Phase pill */
.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--must-lt);
  color: var(--mustard);
  border: 1.5px solid rgba(139,105,20,0.22);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ============================================================
   8. FORM ELEMENTS
   ============================================================ */
.input-pill {
  background: var(--paper);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.input-pill:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-glow);
}
.input-pill::placeholder { color: var(--ink-ghost); }

.select-pill {
  background: var(--paper);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: var(--ink-mid);
  cursor: pointer;
  outline: none;
}

.search-pill {
  background: var(--cream);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.search-pill:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-glow);
}
.search-pill input {
  border: none; outline: none; flex: 1;
  font-family: 'Jost', sans-serif;
  font-size: 13px; color: var(--ink);
  background: transparent;
}
.search-pill input::placeholder { color: var(--ink-ghost); }

.field-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 5px;
  display: block;
}

/* Filter chips */
.filter-chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1.5px solid var(--paper-deep);
  background: var(--cream);
  color: var(--ink-soft);
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-chip:hover { background: var(--paper-warm); }
.filter-chip.active { background: var(--forest); color: var(--paper); border-color: var(--forest); }

/* ============================================================
   9. PHOTO HERO
   ============================================================ */
.photo-hero {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}

/* The img wrapper defines the height — image sits absolute inside it */
.photo-hero-img {
  position: relative;
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, #1a2e20 0%, #0f1e14 100%);
}
.photo-hero-img img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.photo-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a2e20 0%, #243828 50%, #1a2e20 100%);
}
.photo-placeholder-inner { text-align: center; padding: 24px; }
.photo-ph-icon  { font-size: 36px; opacity: 0.25; margin-bottom: 12px; }
.photo-ph-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 600; font-style: italic;
  color: rgba(245,239,228,0.5); margin-bottom: 6px;
}
.photo-ph-desc  { font-size: 12px; color: rgba(245,239,228,0.28); max-width: 380px; line-height: 1.6; margin: 0 auto 8px; }
.photo-ph-spec  {
  display: inline-block; font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(139,105,20,0.6);
  border: 1px dashed rgba(139,105,20,0.35);
  border-radius: var(--r-pill); padding: 4px 14px;
}

.photo-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(10,20,13,0.82) 0%, rgba(10,20,13,0.6) 60%, rgba(10,20,13,0.2) 100%);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 40px var(--content-pad);
  box-sizing: border-box;
}

.photo-hero-left  { flex: 1; max-width: 440px; }
.photo-hero-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mustard); margin-bottom: 8px; }
.photo-hero-title { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 700; font-style: italic; color: var(--paper); line-height: 1.1; margin-bottom: 10px; }
.photo-hero-sub   { font-size: 14px; color: rgba(245,239,228,0.62); line-height: 1.65; margin-bottom: 20px; }
.photo-hero-stats { display: flex; gap: 14px; flex-shrink: 0; }

.hero-stat {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  min-width: 72px;
  border: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 700; color: var(--paper); line-height: 1;
}
.hero-stat-lbl {
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(245,239,228,0.45); margin-top: 3px;
}

/* ============================================================
   10. TOOLBAR & FILTER ROW
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   11. LOADING & EMPTY STATES
   ============================================================ */
.loading-state {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--cream);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-card);
  margin-top: 16px;
}
.loading-state.show { display: flex; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--paper-deep);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 240px; text-align: center; gap: 10px;
}
.empty-icon  { font-size: 42px; opacity: 0.3; }
.empty-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.empty-body  { font-size: 13px; color: var(--ink-soft); max-width: 260px; line-height: 1.6; }

/* ============================================================
   12. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed; bottom: 28px; right: 28px;
  display: flex; flex-direction: column; gap: 8px; z-index: 500;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast-success { background: var(--forest);   color: var(--paper); }
.toast-warning { background: var(--burgundy); color: var(--paper); }
.toast-info    { background: var(--slate);    color: var(--paper); }

/* ============================================================
   13. TABLES
   ============================================================ */
.dewey-table { width: 100%; border-collapse: collapse; }
.dewey-table th {
  background: var(--paper);
  padding: 10px 16px;
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); text-align: left;
  border-bottom: 1px solid var(--paper-deep);
}
.dewey-table td {
  padding: 12px 16px; font-size: 13px;
  color: var(--ink-mid); border-bottom: 1px solid var(--paper-warm);
  vertical-align: middle;
}
.dewey-table tr:last-child td { border-bottom: none; }
.dewey-table tr:hover td { background: var(--paper); }
.dewey-table td:first-child { font-family: 'Cormorant Garamond', serif; font-size: 15px; font-weight: 600; color: var(--ink); }

/* Condition select */
.condition-select {
  background: var(--paper); border: 1px solid var(--paper-deep);
  border-radius: 20px; padding: 4px 10px;
  font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--ink-mid); cursor: pointer; outline: none; transition: all 0.15s;
}
.condition-select.excellent { color: #2C5F35; background: #EBF2EC; }
.condition-select.good      { color: var(--forest); background: var(--forest-lt); }
.condition-select.fair      { color: var(--mustard); background: var(--must-lt); }
.condition-select.poor      { color: var(--burgundy); background: var(--burg-lt); }

/* Status pills in table */
.status-out { color: var(--burgundy); font-weight: 500; font-size: 11px; background: var(--burg-lt); padding: 3px 10px; border-radius: var(--r-pill); display: inline-block; }
.status-in  { color: var(--forest);   font-weight: 500; font-size: 11px; background: var(--forest-lt); padding: 3px 10px; border-radius: var(--r-pill); display: inline-block; }

/* ============================================================
   14. GENRE CHART
   ============================================================ */
.genre-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.genre-label   { font-size: 12px; font-weight: 500; color: var(--ink-mid); width: 90px; flex-shrink: 0; }
.genre-track   { flex: 1; height: 10px; background: var(--paper-warm); border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--paper-deep); }
.genre-fill    { height: 100%; border-radius: var(--r-pill); transition: width 0.8s ease; }
.genre-count   { font-size: 12px; font-weight: 500; color: var(--ink-soft); width: 26px; text-align: right; flex-shrink: 0; }
.genre-alert   { font-size: 10px; color: var(--burgundy); margin-left: 4px; flex-shrink: 0; }

/* ============================================================
   15. SALES PAGE SPECIFIC
   ============================================================ */

/* Full-width page (no sidebar) */
.page-marketing {
  margin-left: 0;
  background: var(--paper);
}

/* Marketing navbar */
.mkt-nav {
  background: var(--cream);
  border-bottom: 1px solid var(--paper-deep);
  padding: 0 60px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.mkt-nav-logo  { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; font-style: italic; color: var(--forest); }
.mkt-nav-links { display: flex; gap: 32px; }
.mkt-nav-link  { font-size: 13px; font-weight: 500; color: var(--ink-mid); transition: color 0.2s; }
.mkt-nav-link:hover { color: var(--forest); }
.mkt-nav-right { display: flex; align-items: center; gap: 12px; }

/* Marketing sections */
.mkt-section { padding: 80px 60px; max-width: var(--max-content); margin: 0 auto; }
.mkt-section-sm { padding: 60px 60px; max-width: var(--max-content); margin: 0 auto; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 28px; margin-bottom: 14px; display: block; }
.feature-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.feature-desc  { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

/* Pricing cards */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pricing-card {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pricing-card-featured {
  border: 2px solid var(--forest);
  box-shadow: 0 4px 24px var(--forest-glow);
}
.pricing-head { padding: 24px 24px 20px; border-bottom: 1px solid var(--paper-warm); }
.pricing-head.featured-head { background: var(--forest); }
.pricing-tier  { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.pricing-head.featured-head .pricing-tier { color: rgba(245,239,228,0.5); }
.pricing-price { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1; }
.pricing-head.featured-head .pricing-price { color: var(--paper); }
.pricing-period{ font-size: 13px; font-weight: 400; color: var(--ink-ghost); margin-left: 4px; }
.pricing-head.featured-head .pricing-period{ color: rgba(245,239,228,0.45); }
.pricing-desc  { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.pricing-head.featured-head .pricing-desc { color: rgba(245,239,228,0.55); }
.pricing-body  { padding: 20px 24px; }
.pricing-feature { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--ink-mid); line-height: 1.5; }
.pricing-check { color: var(--forest); font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.pricing-footer{ padding: 0 24px 24px; }

/* Testimonial */
.testimonial {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}
.testimonial-quote { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-style: italic; color: var(--ink); line-height: 1.5; margin-bottom: 16px; }
.testimonial-author { font-size: 13px; font-weight: 500; color: var(--ink-mid); }
.testimonial-role   { font-size: 12px; color: var(--ink-ghost); margin-top: 2px; }

/* Footer */
.mkt-footer {
  background: var(--forest);
  padding: 48px 60px 36px;
  color: rgba(245,239,228,0.65);
}
.mkt-footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; font-style: italic; color: var(--paper); margin-bottom: 8px; }
.mkt-footer-tag  { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(245,239,228,0.35); }
.mkt-footer-link { font-size: 12px; color: rgba(245,239,228,0.5); transition: color 0.2s; display: block; margin-bottom: 6px; }
.mkt-footer-link:hover { color: var(--paper); }
.mkt-footer-legal { font-size: 11px; color: rgba(245,239,228,0.3); margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ============================================================
   16. UTILITY CLASSES
   ============================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1       { flex: 1; }
.flex-shrink-0{ flex-shrink: 0; }
.flex-wrap    { flex-wrap: wrap; }
.gap-4        { gap: 4px; }
.gap-6        { gap: 6px; }
.gap-8        { gap: 8px; }
.gap-10       { gap: 10px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.gap-20       { gap: 20px; }
.gap-24       { gap: 24px; }

.grid-2       { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4       { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto    { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mb-32 { margin-bottom: 32px; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.relative{ position: relative; }
.overflow-hidden { overflow: hidden; }
.hidden  { display: none; }

.divider {
  border: none;
  border-top: 1px solid var(--paper-deep);
  margin: 40px 0;
}

.divider-dark {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 32px 0;
}

/* ============================================================
   17. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --content-pad: 28px; }
  .mkt-section { padding: 60px 40px; }
  .mkt-nav { padding: 0 40px; }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 210px; }
  .topbar { padding: 0 20px; }
  .photo-hero-overlay { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
  .photo-hero-stats { width: 100%; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mkt-nav-links { display: none; }
}

@media (max-width: 620px) {
  :root { --sidebar-w: 0px; }

  /* Sidebar becomes bottom tab bar */
  .sidebar {
    width: 100%; height: 60px;
    flex-direction: row;
    top: auto; bottom: 0;
    padding: 0 8px;
    justify-content: space-around;
  }
  .sidebar-logo { display: none; }
  .sidebar-nav {
    flex-direction: row;
    padding: 0 4px;
    gap: 2px;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-divider, .sidebar-section-label { display: none; }
  .sidebar-nav .nav-item:last-child { margin-top: 0; padding-top: 0; border-top: none; }
  .nav-item {
    flex-direction: column;
    gap: 2px;
    padding: 6px 6px 4px;
    border-radius: 8px;
    font-size: 8.5px;
    min-width: 52px;
    max-width: 68px;
    min-height: 52px;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-align: center;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-item::before, .nav-item::after { display: none !important; }
  .nav-dot { width: 6px; height: 6px; margin-right: 0; margin-bottom: 1px; }
  .nav-icon { width: 26px; height: 26px; font-size: 13px; }
  .nav-badge { display: none; }
  .main { margin-left: 0; margin-bottom: 60px; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 14px; }
  .topbar-stat { display: none; }
  .photo-hero-img { height: 260px; }
  .photo-hero-title { font-size: 26px; }
  .photo-hero-stats { justify-content: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mkt-section { padding: 40px 20px; }
  .mkt-footer { padding: 36px 24px 28px; }
  .mkt-nav { padding: 0 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   18. BOOK GRID & TILES  (app pages)
   ============================================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.book-tile {
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.book-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book-spine-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 14px; text-align: center;
  color: rgba(255,255,255,0.85);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700; font-size: 13px; font-style: italic;
  line-height: 1.3;
}
.spine-title {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.book-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2;
}
.book-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,22,16,0.5) 0%, transparent 55%);
  z-index: 3;
}
.book-spine-line {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 6px; background: rgba(0,0,0,0.14);
}
.call-label {
  position: relative;
  background: rgba(255,255,255,0.93);
  border-radius: 4px;
  padding: 3px 6px;
  font-family: 'Jost', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); text-align: center;
  line-height: 1.5; width: calc(100% - 14px);
}
.book-tile-body { padding: 11px 13px 13px; }
.book-tile-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; font-weight: 600;
  color: var(--ink); line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 2px;
}
.book-tile-author {
  font-size: 11px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-bottom: 7px;
}

/* ============================================================
   19. CIRCULATION TABLE
   ============================================================ */
.circ-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.circ-stat {
  background: var(--cream); border: 1px solid var(--paper-deep);
  border-radius: var(--r-card); padding: 20px 22px;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.circ-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.circ-stat.featured { background: linear-gradient(135deg, var(--forest), #1E3828); border-color: var(--forest); }
.circ-stat-icon  { font-size: 20px; margin-bottom: 10px; display: block; }
.circ-stat-num   { font-family: 'Cormorant Garamond', serif; font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 3px; }
.circ-stat.featured .circ-stat-num { color: var(--paper); }
.circ-stat-lbl   { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-ghost); }
.circ-stat.featured .circ-stat-lbl { color: rgba(245,239,228,0.45); }

.circ-table-wrap  { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sm); }
.circ-table-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 14px; border-bottom: 1px solid var(--paper-warm); }
.circ-table-header h3 { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.circ-table { width: 100%; border-collapse: collapse; }
.circ-table th { background: var(--paper); padding: 10px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); text-align: left; border-bottom: 1px solid var(--paper-deep); }
.circ-table td { padding: 12px 16px; font-size: 13px; color: var(--ink-mid); border-bottom: 1px solid var(--paper-warm); vertical-align: middle; }
.circ-table tr:last-child td { border-bottom: none; }
.circ-table tr:hover td { background: var(--paper); }
.circ-table td:first-child { font-family: 'Cormorant Garamond', serif; font-size: 15px; font-weight: 600; color: var(--ink); }

/* ============================================================
   20. STUDENTS PAGE
   ============================================================ */
.students-intro {
  border-radius: var(--r-card); padding: 28px 34px;
  margin-bottom: 24px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--forest) 0%, #1E3828 100%);
}
.students-intro h2 { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; font-style: italic; color: var(--paper); margin-bottom: 6px; }
.students-intro p  { font-size: 13px; color: rgba(245,239,228,0.65); max-width: 480px; line-height: 1.6; }
.privacy-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-pill); padding: 5px 14px;
  font-size: 11px; font-weight: 500; color: rgba(245,239,228,0.9);
  margin-top: 12px; letter-spacing: 0.03em;
}
.add-student-card { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.add-student-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.add-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.add-num {
  width: 70px; background: var(--paper); border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill); padding: 9px 14px;
  font-family: 'Jost', sans-serif; font-size: 13px; color: var(--ink);
  outline: none; text-align: center;
}
.add-num:focus { border-color: var(--burgundy); }
.add-username {
  flex: 1; min-width: 160px; background: var(--paper);
  border: 1.5px solid var(--paper-deep); border-radius: var(--r-pill);
  padding: 9px 16px; font-family: 'Jost', sans-serif;
  font-size: 13px; color: var(--ink); outline: none;
}
.add-username:focus  { border-color: var(--burgundy); }
.add-username::placeholder { color: var(--ink-ghost); }
.roster-wrap { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sm); }
.roster-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px 12px; border-bottom: 1px solid var(--paper-warm); }
.roster-header h3 { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.roster-table { width: 100%; border-collapse: collapse; }
.roster-table th { background: var(--paper); padding: 9px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); text-align: left; border-bottom: 1px solid var(--paper-deep); }
.roster-table td { padding: 11px 16px; font-size: 13px; color: var(--ink-mid); border-bottom: 1px solid var(--paper-warm); vertical-align: middle; }
.roster-table tr:last-child td { border-bottom: none; }
.roster-table tr:hover td { background: var(--paper); }
.student-num { width: 32px; height: 32px; border-radius: 50%; background: var(--burg-lt); color: var(--burgundy); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.student-username { font-family: 'Cormorant Garamond', serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.student-points { font-size: 12px; font-weight: 500; color: var(--forest); }
.privacy-note { display: flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--must-lt); border-top: 1px solid rgba(139,105,20,0.18); }
.privacy-note p { font-size: 12px; color: var(--mustard); line-height: 1.5; }

/* ============================================================
   21. SECTION HEADINGS  (app)
   ============================================================ */
.section-heading { margin-bottom: 26px; }
.section-heading h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.4px; line-height: 1.1;
}
.section-heading p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ============================================================
   22. LITERACY COMING-SOON PAGE
   ============================================================ */
.literacy-coming {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 380px; text-align: center; gap: 14px;
}
.literacy-coming .big-icon { font-size: 56px; opacity: 0.5; margin-bottom: 6px; }
.literacy-coming h2 { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 600; color: var(--ink); }
.literacy-coming p  { font-size: 13px; color: var(--ink-soft); max-width: 360px; line-height: 1.7; }

/* ============================================================
   23. SCAN PANEL  (inside library page)
   ============================================================ */
.scan-panel { display: none; background: var(--cream); border: 1.5px solid var(--paper-deep); border-radius: var(--r-card); padding: 28px; margin-bottom: 24px; animation: fadeUp 0.25s ease; box-shadow: var(--shadow-md); }
.scan-panel.open { display: block; }
.scan-inner { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.scanner-box { background: #111; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; position: relative; border: 2px solid rgba(255,255,255,0.05); box-shadow: 0 8px 28px rgba(0,0,0,0.28); }
.scanner-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, #1a1a1a, #0f0f0f); }
.scanner-idle-icon  { font-size: 30px; opacity: 0.22; }
.scanner-idle-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.18); text-align: center; }
.scan-corners { position: absolute; inset: 16px; pointer-events: none; }
.scan-corners::before, .scan-corners::after,
.scan-corners span::before, .scan-corners span::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border-color: var(--mustard); border-style: solid;
}
.scan-corners::before  { top:0; left:0;  border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.scan-corners::after   { top:0; right:0; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }
.scan-corners span::before { bottom:0; left:0;  border-width: 0 0 2px 2px; border-radius: 0 0 0 2px; }
.scan-corners span::after  { bottom:0; right:0; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }
.scan-line { position: absolute; left: 16px; right: 16px; height: 2px; background: linear-gradient(90deg, transparent, var(--mustard) 30%, #F5C842, var(--mustard) 70%, transparent); animation: scanMove 2.5s ease-in-out infinite; display: none; filter: blur(0.5px); }
@keyframes scanMove { 0%,100%{top:16px;opacity:0} 8%{opacity:1} 92%{opacity:1} 50%{top:calc(100% - 16px)} }
.scanner-status { position: absolute; bottom:0; left:0; right:0; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); padding: 7px 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.5); text-align: center; }
.scan-controls { display: flex; flex-direction: column; gap: 14px; padding-top: 2px; }
.scan-controls h3 { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.scan-controls p  { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.scan-or { display: flex; align-items: center; gap: 10px; color: var(--ink-ghost); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.scan-or::before, .scan-or::after { content: ''; flex: 1; height: 1px; background: var(--paper-deep); }
.isbn-row { display: flex; gap: 8px; }
.isbn-input { flex: 1; background: var(--paper); border: 1.5px solid var(--paper-deep); border-radius: var(--r-pill); padding: 10px 18px; font-family: 'Jost', sans-serif; font-size: 13px; color: var(--ink); outline: none; transition: all 0.2s; }
.isbn-input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-glow); }
.isbn-input::placeholder { color: var(--ink-ghost); }

/* ============================================================
   24. RESULT CARD  (after book lookup)
   ============================================================ */
.result-card { background: var(--cream); border: 1.5px solid var(--paper-deep); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-md); margin-top: 18px; animation: fadeUp 0.28s ease; }
.result-card.is-dupe { border-color: rgba(107,39,55,0.4); }
.dupe-alert { background: var(--burg-lt); border-bottom: 1px solid rgba(107,39,55,0.18); padding: 9px 22px; font-size: 13px; font-weight: 500; color: var(--burgundy); display: flex; align-items: center; gap: 8px; }
.result-inner { display: flex; gap: 20px; padding: 22px 26px; }
.result-cover { width: 80px; height: 116px; border-radius: 7px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--paper-deep); background: var(--paper-warm); display: flex; align-items: center; justify-content: center; box-shadow: 3px 3px 10px rgba(30,22,16,0.1); }
.result-cover img { width: 100%; height: 100%; object-fit: cover; }
.result-cover-empty { font-size: 26px; color: var(--ink-ghost); }
.result-info { flex: 1; min-width: 0; }
.result-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.2; margin-bottom: 3px; }
.result-author { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.result-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.7; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   25. GENRE SECTION  (library page)
   ============================================================ */
.genre-section { display: grid; grid-template-columns: 1fr 280px; gap: 20px; margin-bottom: 28px; }
.genre-chart-wrap { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); padding: 24px 28px; box-shadow: var(--shadow-sm); }
.genre-chart-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.genre-chart-sub   { font-size: 12px; color: var(--ink-soft); margin-bottom: 20px; }
.genre-alert       { font-size: 10px; color: var(--burgundy); margin-left: 4px; flex-shrink: 0; }
.needs-card { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); padding: 24px 24px; box-shadow: var(--shadow-sm); }
.needs-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.needs-card p  { font-size: 12px; color: var(--ink-soft); margin-bottom: 16px; line-height: 1.5; }
.needs-item  { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--paper-warm); }
.needs-item:last-child { border-bottom: none; }
.needs-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.needs-genre { font-size: 12px; font-weight: 500; color: var(--ink-mid); flex: 1; }
.needs-count { font-size: 11px; color: var(--ink-ghost); }

/* ============================================================
   26. RESPONSIVE ADDITIONS
   ============================================================ */
@media (max-width: 860px) {
  .circ-stats { grid-template-columns: repeat(2, 1fr); }
  .genre-section { grid-template-columns: 1fr; }
  .scan-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .circ-stats { grid-template-columns: repeat(2, 1fr); }
  .book-grid  { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* ============================================================
   27. SHARED HERO TYPOGRAPHY  (used on textbook + sales pages)
   ============================================================ */
.hero-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--mustard); margin-bottom: 10px;
  display: block;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; font-style: italic;
  color: var(--paper); line-height: 1.05;
  letter-spacing: -0.5px; margin-bottom: 10px;
}
.hero-sub {
  font-size: 14px; color: rgba(245,239,228,0.55);
  line-height: 1.68; max-width: 460px;
}

/* ============================================================
   28. PRINT LABEL SHEET  (used on textbook + assets pages)
   ============================================================ */
.label-sheet { display: none; }
@media print {
  body > *:not(.label-sheet) { display: none !important; }
  .label-sheet { display: block !important; padding: 12px; }
  .label-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
  .label-item  {
    border: 1px dashed #999; border-radius: 4px;
    padding: 8px; text-align: center; page-break-inside: avoid;
  }
  .label-item svg { max-width: 100%; height: 48px; }
  .label-title { font-size: 8px; font-weight: 600; margin-top: 4px; word-break: break-word; font-family: Arial,sans-serif; line-height: 1.3; }
  .label-id    { font-size: 9px; font-family: monospace; color: #444; margin-top: 1px; }
  .label-school{ font-size: 7px; color: #888; margin-top: 1px; font-family: Arial,sans-serif; }
}

/* ============================================================
   29. STATE UTILITIES
   ============================================================ */
/* .open and .active used by drawers, FAQs, scan panels */
.open  { display: block !important; }
/* Note: .active is context-dependent (tabs, nav items) — defined per component */

/* ============================================================
   30. MISSING UTILITY CLASSES  (caught in audit)
   ============================================================ */

/* Book cover overlay gradient */
.cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,22,16,0.5) 0%, transparent 55%);
}

/* Pill row — small horizontal pill clusters */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

/* Sort dropdown — library toolbar */
.sort-select {
  background: var(--cream);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: var(--ink-mid);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.sort-select:focus { border-color: var(--forest); }

/* Google G logo — used in sign-in buttons */
.google-g {
  width: 18px; height: 18px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Topbar stat pill */
.topbar-stat {
  background: var(--paper-warm);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-mid);
  display: flex; align-items: center; gap: 6px;
}
.topbar-stat strong { font-weight: 600; color: var(--forest); font-size: 14px; }

/* Page tabs (Library Catalogue / Circulation) — underline style */
.page-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--paper-deep);
  margin-bottom: 24px;
}
.page-tab {
  padding: 11px 24px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.page-tab:hover { color: var(--ink); background: var(--paper-warm); }
.page-tab.active { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }
.page-tab-badge {
  font-size: 10px; font-weight: 600;
  background: var(--burg-lt); color: var(--burgundy);
  padding: 1px 7px; border-radius: var(--r-pill);
}
.page-tab.active .page-tab-badge { background: var(--forest-lt); color: var(--forest); }
.tab-panel { display: none; animation: fadeUp 0.22s ease; }
.tab-panel.active { display: block; }

/* ── Pill tab group — use everywhere for section switching ──────────────
   Usage:
     <div class="tab-pill-group">
       <button class="tab-pill active" onclick="...">Tab One</button>
       <button class="tab-pill" onclick="...">Tab Two</button>
     </div>
   Works for both page-level section tabs and in-card drawer tabs.
   ─────────────────────────────────────────────────────────────────────── */
.tab-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-pill);
  width: fit-content;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
}
.tab-pill:hover {
  background: var(--paper);
  color: var(--ink);
}
.tab-pill.active {
  background: var(--forest);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(44,74,53,0.18);
}

/* Small variant — for in-card drawer tabs */
.tab-pill-group.sm .tab-pill,
.tab-pill.sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* Drawer tabs — pill style, sm sizing ─────────────────────────────────── */
.drawer-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-pill);
  width: fit-content;
  margin-bottom: 16px;
}
.drawer-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
}
.drawer-tab:hover {
  background: var(--paper);
  color: var(--ink);
}
.drawer-tab.active {
  background: var(--forest);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(44,74,53,0.18);
}

/* Label SVG (for barcode previews) */
.label-svg { max-width: 100%; }


/* ============================================================
   SALES PAGE (index.html)
   ============================================================ */

.sales-main { margin-left: var(--sidebar-w); min-height: 100vh; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 8px 16px; }
.sidebar-section-label { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245,239,228,0.25); padding: 8px 16px 4px; }

/* Hero */
.sales-hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; background: linear-gradient(135deg, #0f1e14 0%, #1a2e20 40%, #243828 100%); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: .32; }
.hero-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .07; text-align: center; }
.hero-ph span { font-size: 110px; display: block; margin-bottom: 12px; }
.hero-ph p { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); border: 1px dashed rgba(245,239,228,.5); border-radius: var(--r-pill); padding: 4px 14px; display: inline-block; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(10,20,13,.9) 0%, rgba(10,20,13,.7) 55%, rgba(10,20,13,.25) 100%); }
.hero-content { position: relative; z-index: 2; padding: 0 52px; width: 100%; max-width: 860px; }
.hero-title em { font-style: normal; color: #A8C8A8; }
.hero-ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

/* Google sign-in button */
.google-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); color: #2a2a2a; padding: 12px 24px; border-radius: var(--r-pill); font-family: "Jost", sans-serif; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all .2s; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.google-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.28); }
.g-logo { width: 20px; height: 20px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Trust chips */
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; }
.trust-chip { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(245,239,228,.42); }
.trust-chip::before { content: "✓"; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 9px; color: rgba(245,239,228,.5); }

/* Problem bar */
.problem-bar { background: var(--ink); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.problem-item { padding: 44px 34px; border-right: 1px solid rgba(255,255,255,.05); transition: background .2s; }
.problem-item:last-child { border-right: none; }
.problem-item:hover { background: rgba(255,255,255,.02); }
.problem-num { font-family: "Cormorant Garamond", serif; font-size: 48px; font-weight: 700; color: rgba(245,239,228,.05); line-height: 1; margin-bottom: 14px; }
.problem-title { font-family: "Cormorant Garamond", serif; font-size: 20px; font-weight: 600; color: var(--paper); margin-bottom: 9px; }
.problem-body { font-size: 13px; color: rgba(245,239,228,.42); line-height: 1.72; }

/* Proof strip */
.proof-strip { background: var(--forest); padding: 18px 52px; display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; }
.proof-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(245,239,228,.6); }
.proof-num { font-family: "Cormorant Garamond", serif; font-size: 20px; font-weight: 700; color: var(--paper); }
.proof-sep { width: 1px; height: 24px; background: rgba(255,255,255,.12); }

/* Sections */
.section { padding: 76px 52px; }
.section-alt { padding: 76px 52px; background: var(--cream); }
.eyebrow-lbl { display: block; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mustard); margin-bottom: 10px; }
.sec-title { font-family: "Cormorant Garamond", serif; font-size: clamp(28px, 3.2vw, 42px); font-weight: 600; color: var(--ink); line-height: 1.1; letter-spacing: -.3px; margin-bottom: 12px; }
.sec-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.72; max-width: 500px; }

/* Features grid */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; margin-top: 44px; }
.feat-card { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); padding: 26px 22px; box-shadow: var(--shadow-sm); transition: all .2s; }
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feat-icon { font-size: 24px; margin-bottom: 13px; display: block; }
.feat-title { font-family: "Cormorant Garamond", serif; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.feat-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

/* How it works */
.how-step { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; margin-bottom: 68px; }
.how-step:last-child { margin-bottom: 0; }
.how-step.flip { direction: rtl; }
.how-step.flip > * { direction: ltr; }
.how-visual { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); min-height: 240px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.how-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--forest-lt) 0%, var(--cream) 100%); opacity: .6; }
.how-visual-icon { font-size: 68px; position: relative; z-index: 1; }
.how-num { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mustard); margin-bottom: 9px; }
.how-title { font-family: "Cormorant Garamond", serif; font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1.12; margin-bottom: 11px; }
.how-body { font-size: 14px; color: var(--ink-soft); line-height: 1.74; margin-bottom: 16px; }

/* Pricing */
.pricing-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 44px; }
.price-card { background: var(--cream); border: 1px solid var(--paper-deep); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sm); transition: all .2s; display: flex; flex-direction: column; }
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.price-card.best { border: 2px solid var(--forest); box-shadow: 0 4px 24px var(--forest-glow); }
.price-head { padding: 22px 20px 16px; border-bottom: 1px solid var(--paper-warm); }
.price-head.bh { background: var(--forest); }
.price-tier { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.bh .price-tier { color: rgba(245,239,228,.45); }
.price-amt { font-family: "Cormorant Garamond", serif; font-size: 36px; font-weight: 700; color: var(--ink); line-height: 1; }
.bh .price-amt { color: var(--paper); }
.price-per { font-size: 11px; font-weight: 400; color: var(--ink-ghost); margin-left: 3px; }
.bh .price-per { color: rgba(245,239,228,.4); }
.price-desc { font-size: 11px; color: var(--ink-soft); margin-top: 5px; line-height: 1.5; }
.bh .price-desc { color: rgba(245,239,228,.5); }
.price-body { padding: 16px 20px; flex: 1; }
.price-feat { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 8px; font-size: 12px; color: var(--ink-mid); line-height: 1.5; }
.pck { color: var(--forest); flex-shrink: 0; margin-top: 1px; }
.pno { color: var(--ink-ghost); flex-shrink: 0; margin-top: 1px; }
.price-feat.dim { opacity: .38; }
.price-foot { padding: 0 20px 20px; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.testi-card { background: var(--paper); border: 1px solid var(--paper-deep); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-sm); }
.testi-stars { color: var(--mustard); font-size: 12px; letter-spacing: 3px; margin-bottom: 10px; }
.testi-quote { font-family: "Cormorant Garamond", serif; font-size: 17px; font-style: italic; color: var(--ink); line-height: 1.55; margin-bottom: 14px; }
.testi-name { font-size: 13px; font-weight: 500; color: var(--ink-mid); }
.testi-role { font-size: 11px; color: var(--ink-ghost); margin-top: 2px; }

/* FAQ */
.faq-wrap { max-width: 740px; margin-top: 44px; }
.faq-item { border-bottom: 1px solid var(--paper-deep); }
.faq-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; background: none; border: none; text-align: left; font-family: "Cormorant Garamond", serif; font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; transition: color .2s; }
.faq-btn:hover { color: var(--forest); }
.faq-icon { font-size: 20px; color: var(--ink-ghost); flex-shrink: 0; transition: transform .2s; line-height: 1; }
.faq-icon.open { transform: rotate(45deg); color: var(--forest); }
.faq-answer { font-size: 13px; color: var(--ink-soft); line-height: 1.75; padding-bottom: 18px; display: none; }
.faq-answer.open { display: block; }

/* CTA section */
.cta-section { background: linear-gradient(135deg, var(--forest) 0%, #1A3020 100%); padding: 84px 52px; text-align: center; position: relative; overflow: hidden; }
.cta-section::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(245,239,228,.05) 0%, transparent 70%); pointer-events: none; }
.cta-title { font-family: "Cormorant Garamond", serif; font-size: clamp(34px, 4.5vw, 54px); font-weight: 700; font-style: italic; color: var(--paper); line-height: 1.08; margin-bottom: 14px; position: relative; }
.cta-sub { font-size: 15px; color: rgba(245,239,228,.58); max-width: 400px; margin: 0 auto 34px; line-height: 1.72; position: relative; }
.cta-btns { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; position: relative; }
.cta-fine { font-size: 11px; color: rgba(245,239,228,.28); margin-top: 18px; position: relative; }

/* Footer */
.sales-footer { background: #0E1C12; padding: 50px 52px 34px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 34px; }
.footer-logo { font-family: "Cormorant Garamond", serif; font-size: 28px; font-weight: 700; font-style: italic; color: var(--paper); }
.footer-tagline { font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(245,239,228,.22); margin-top: 4px; }
.footer-blurb { font-size: 12px; color: rgba(245,239,228,.28); margin-top: 12px; line-height: 1.65; max-width: 230px; }
.footer-col-lbl { font-size: 9px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(245,239,228,.2); margin-bottom: 11px; display: block; }
.footer-link { display: block; font-size: 12px; color: rgba(245,239,228,.42); margin-bottom: 7px; transition: color .2s; }
.footer-link:hover { color: var(--paper); }
.footer-legal { font-size: 11px; color: rgba(245,239,228,.18); padding-top: 18px; border-top: 1px solid rgba(255,255,255,.06); }

/* Sales page responsive */
@media (max-width: 860px) {
  .sales-main { margin-left: 210px; }
  .hero-content { padding: 0 28px; }
  .section, .section-alt { padding: 56px 28px; }
  .cta-section { padding: 56px 28px; }
  .proof-strip { padding: 16px 28px; }
  .how-step { grid-template-columns: 1fr; gap: 28px; }
  .pricing-row { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .problem-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .sales-main { margin-left: 0; margin-bottom: 60px; }
  .hero-content { padding: 0 16px; }
  .section, .section-alt { padding: 44px 16px; }
  .cta-section { padding: 44px 16px; }
  .problem-grid { grid-template-columns: 1fr; }
  .pricing-row { grid-template-columns: 1fr; }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .proof-strip { padding: 16px; gap: 16px; }
  .proof-sep { display: none; }
}


/* ============================================================
   BOOKSHOP PAGE — extracted from inline styles May 2026
   ============================================================ */
.asset-hero { background:linear-gradient(135deg,var(--slate) 0%,#2E4A5E 100%); border-radius:var(--r-card); padding:28px 34px; margin-bottom:20px; position:relative; overflow:hidden; }
.asset-hero h2 { font-family:'Cormorant Garamond',serif; font-size:26px; font-weight:600; font-style:italic; color:var(--paper); margin-bottom:6px; }
.asset-hero p  { font-size:13px; color:rgba(237,242,246,0.65); max-width:520px; line-height:1.6; }
.asset-tabs { display:flex; gap:0; border-bottom:1px solid var(--paper-deep); margin-bottom:22px; }
.asset-tab { padding:10px 20px; font-size:13px; font-weight:500; color:var(--ink-soft); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:all 0.15s; }
.asset-tab:hover { color:var(--ink); }
.asset-tab.active { color:var(--slate); border-bottom-color:var(--slate); font-weight:600; }
.asset-panel { display:none; }
.asset-panel.active { display:block; }
.add-asset-card { background:var(--cream); border:1px solid var(--paper-deep); border-radius:var(--r-card); padding:22px 26px; margin-bottom:18px; box-shadow:var(--shadow-sm); }
.add-asset-card h3 { font-family:'Cormorant Garamond',serif; font-size:18px; font-weight:600; color:var(--ink); margin-bottom:14px; }
.asset-form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:10px; }
.asset-form-group { display:flex; flex-direction:column; gap:5px; }
.asset-table-wrap { background:var(--cream); border:1px solid var(--paper-deep); border-radius:var(--r-card); overflow:hidden; box-shadow:var(--shadow-sm); }
.asset-table-header { display:flex; align-items:center; justify-content:space-between; padding:16px 22px 12px; border-bottom:1px solid var(--paper-warm); }
.asset-table-header h3 { font-family:'Cormorant Garamond',serif; font-size:19px; font-weight:600; color:var(--ink); }
.asset-table th { background:var(--paper); padding:9px 14px; font-size:11px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-soft); text-align:left; border-bottom:1px solid var(--paper-deep); }
.asset-table td { padding:10px 14px; font-size:13px; color:var(--ink-mid); border-bottom:1px solid var(--paper-warm); vertical-align:middle; }
.asset-table tr:last-child td { border-bottom:none; }
.asset-table tr:hover td { background:var(--paper); }
.asset-id { font-family:monospace; font-size:12px; font-weight:600; color:var(--slate); background:var(--slate-lt); padding:2px 8px; border-radius:5px; }
.checkout-scan-box { background:var(--cream); border:1.5px solid var(--paper-deep); border-radius:var(--r-card); padding:22px 26px; margin-bottom:18px; box-shadow:var(--shadow-sm); }
.checkout-scan-box h3 { font-family:'Cormorant Garamond',serif; font-size:18px; font-weight:600; color:var(--ink); margin-bottom:4px; }
.checkout-result { background:var(--forest-lt); border:1px solid rgba(44,74,53,0.25); border-radius:14px; padding:14px 18px; margin-top:12px; display:none; animation:fadeUp 0.2s ease; }
.checkout-result.dupe { background:var(--burg-lt); border-color:rgba(107,39,55,0.25); }
.shop-hero{background:linear-gradient(135deg,var(--mustard) 0%,#6B4F0A 100%);border-radius:var(--r-card);padding:28px 34px;margin-bottom:24px;position:relative;overflow:hidden}
.shop-hero::after{content:"$";position:absolute;right:24px;bottom:-30px;font-family:"Cormorant Garamond",serif;font-size:180px;font-weight:700;color:rgba(255,255,255,0.06);pointer-events:none}
.shop-hero h2{font-family:"Cormorant Garamond",serif;font-size:26px;font-weight:600;font-style:italic;color:var(--paper);margin-bottom:6px}
.shop-hero p{font-size:13px;color:rgba(245,239,228,0.68);max-width:520px;line-height:1.6}
.shop-local-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.2);border-radius:var(--r-pill);padding:5px 14px;font-size:11px;font-weight:500;color:rgba(245,239,228,0.9);margin-top:12px}
.shop-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.shop-section-title{font-family:"Cormorant Garamond",serif;font-size:22px;font-weight:600;color:var(--ink)}
.shop-section-sub{font-size:12px;color:var(--ink-soft)}
.shop-genre-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-bottom:28px}
.genre-shop-card{background:var(--cream);border:1px solid var(--paper-deep);border-radius:16px;padding:16px 18px;cursor:pointer;transition:all 0.2s;box-shadow:var(--shadow-sm);display:flex;align-items:center;gap:12px}
.genre-shop-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:var(--mustard)}
.genre-shop-icon{font-size:24px;flex-shrink:0}
.genre-shop-name{font-family:"Cormorant Garamond",serif;font-size:16px;font-weight:600;color:var(--ink)}
.genre-shop-count{font-size:11px;color:var(--ink-soft);margin-top:2px}
.genre-shop-card.needs-books{border-color:var(--burgundy);background:var(--burg-lt)}
.genre-shop-card.needs-books .genre-shop-name{color:var(--burgundy)}
.needs-tag{font-size:9px;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:var(--burgundy);background:rgba(107,39,55,0.1);padding:2px 7px;border-radius:var(--r-pill);margin-top:4px;display:inline-block}
.partner-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin-bottom:28px}
.partner-card{background:var(--cream);border:1px solid var(--paper-deep);border-radius:var(--r-card);overflow:hidden;box-shadow:var(--shadow-sm);transition:all 0.2s}
.partner-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.partner-head{padding:16px 18px 12px;border-bottom:1px solid var(--paper-warm)}
.partner-priority{font-size:9px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;margin-bottom:6px}
.priority-local{color:var(--forest)}.priority-2{color:var(--slate)}.priority-3{color:var(--mustard)}.priority-fallback{color:var(--ink-ghost)}
.partner-name{font-family:"Cormorant Garamond",serif;font-size:18px;font-weight:600;color:var(--ink);margin-bottom:3px}
.partner-commission{font-size:11px;font-weight:600;color:var(--forest)}
.partner-body{padding:12px 18px 14px;font-size:12px;color:var(--ink-soft);line-height:1.6}
.partner-foot{padding:0 18px 16px}
.isbn-search-row{display:flex;gap:8px;margin-bottom:20px}
.isbn-search-input{flex:1;background:var(--paper);border:1.5px solid var(--paper-deep);border-radius:var(--r-pill);padding:10px 18px;font-family:"Jost",sans-serif;font-size:13px;color:var(--ink);outline:none;transition:all 0.2s}
.isbn-search-input:focus{border-color:var(--mustard);box-shadow:0 0 0 3px rgba(139,105,20,0.1)}
.isbn-search-input::placeholder{color:var(--ink-ghost)}
.find-results{display:flex;flex-direction:column;gap:10px}
.find-result-card{background:var(--cream);border:1px solid var(--paper-deep);border-radius:16px;padding:14px 18px;display:flex;align-items:center;gap:14px;box-shadow:var(--shadow-sm);animation:fadeUp 0.25s ease}
.find-result-cover{width:44px;height:60px;border-radius:6px;object-fit:cover;flex-shrink:0;background:var(--paper-warm);border:1px solid var(--paper-deep)}
.find-result-info{flex:1;min-width:0}
.find-result-title{font-family:"Cormorant Garamond",serif;font-size:15px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.find-result-author{font-size:12px;color:var(--ink-soft);margin-top:2px}
.find-result-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.shop-link{display:inline-flex;align-items:center;gap:5px;padding:4px 12px;border-radius:var(--r-pill);font-size:11px;font-weight:500;text-decoration:none;transition:all 0.15s;border:1px solid currentColor}
.shop-link-local{color:var(--forest);background:var(--forest-lt)}.shop-link-local:hover{background:var(--forest);color:var(--paper)}
.shop-link-bookshop{color:var(--slate);background:var(--slate-lt)}.shop-link-bookshop:hover{background:var(--slate);color:var(--paper)}
.shop-link-thrift{color:var(--mustard);background:var(--must-lt)}.shop-link-thrift:hover{background:var(--mustard);color:var(--paper)}
.shop-link-amazon{color:var(--ink-soft);background:var(--paper-warm);border-color:var(--paper-deep)}.shop-link-amazon:hover{background:var(--paper-deep)}
.wishlist-strip{background:var(--must-lt);border:1px solid rgba(139,105,20,0.25);border-radius:var(--r-card);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.wishlist-strip p{font-size:13px;color:var(--mustard);line-height:1.5}
.book-tile-actions { opacity: 1 !important; }


/* ═══════════════════════════════════════════════════════
   TEXTBOOK / CLASSROOM INVENTORY PAGE (textbook.html)
   ═══════════════════════════════════════════════════════ */

/* Subject card colour tokens — one per subject */
.sub-math    { --sub-accent: #2C4A35; --sub-lt: #EBF2EC; }
.sub-science { --sub-accent: #4A6B82; --sub-lt: #EDF2F6; }
.sub-social  { --sub-accent: #8B6914; --sub-lt: #F9F2E0; }
.sub-english { --sub-accent: #6B2737; --sub-lt: #F8EDEE; }
.sub-french  { --sub-accent: #7A5C8A; --sub-lt: #F3EEF7; }
.sub-art     { --sub-accent: #5C7A3E; --sub-lt: #EEF5E8; }
.sub-phys    { --sub-accent: #5C4A32; --sub-lt: #EDE5D8; }
.sub-music   { --sub-accent: #3A6B6B; --sub-lt: #E8F5F5; }
.sub-other   { --sub-accent: #5C5C5C; --sub-lt: #EFEFEF; }

/* Scan bar — sticky strip below hero */
.scan-bar {
  background: var(--paper-cream);
  border-bottom: 1px solid var(--paper-deep);
  padding: 14px var(--content-pad);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.scan-bar-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.scan-mode-pills { display: flex; gap: 6px; }
.scan-mode-pill {
  padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--paper-deep);
  background: var(--paper); color: var(--ink-soft);
  transition: all 0.15s;
}
.scan-mode-pill.active.checkout { background: var(--burgundy);  color: var(--paper); border-color: var(--burgundy); }
.scan-mode-pill.active.return   { background: var(--forest);    color: var(--paper); border-color: var(--forest); }
.scan-mode-pill.active.register { background: var(--slate);     color: var(--paper); border-color: var(--slate); }
.scan-input-wrap { flex: 1; min-width: 200px; max-width: 380px; display: flex; gap: 8px; }
.scan-bar-input {
  flex: 1;
  background: var(--paper);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-family: 'Jost', sans-serif; font-size: 13px;
  color: var(--ink); outline: none;
  transition: all 0.2s;
}
.scan-bar-input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(44,74,53,0.1); }
.scan-bar-input::placeholder { color: var(--ink-ghost); }
.student-select-wrap { display: flex; align-items: center; gap: 8px; }
.student-select-wrap label { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.scan-feedback { flex: 1; min-width: 160px; font-size: 12px; line-height: 1.5; padding: 6px 14px; border-radius: 10px; display: none; }
.scan-feedback.show { display: block; }
.scan-feedback.ok  { background: var(--forest-lt); color: var(--forest); }
.scan-feedback.err { background: var(--burg-lt);   color: var(--burgundy); }

/* Content area */
.tb-content { padding: 32px var(--content-pad) 48px; }

/* Subject cards grid */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.subject-card {
  background: var(--paper-cream);
  border: 1px solid var(--paper-deep);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  cursor: pointer;
}
.subject-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.subject-card-top {
  background: var(--sub-accent);
  padding: 18px 20px 14px;
  position: relative; overflow: hidden;
}
.subject-card-top::after {
  content: attr(data-icon);
  position: absolute; right: 14px; bottom: -8px;
  font-size: 52px; opacity: 0.15; pointer-events: none;
}
.subject-card-grade { font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 5px; }
.subject-card-name  { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 700; color: #fff; line-height: 1.1; }
.subject-card-isbn  { font-size: 10px; font-family: monospace; color: rgba(255,255,255,0.4); margin-top: 3px; }
.subject-progress   { height: 4px; background: rgba(255,255,255,0.15); position: relative; }
.subject-progress-fill { height: 100%; background: rgba(255,255,255,0.6); transition: width 0.6s ease; }
.subject-card-body  { padding: 14px 18px 16px; }
.subject-counts     { display: flex; gap: 16px; margin-bottom: 12px; }
.subject-count      { display: flex; flex-direction: column; gap: 1px; }
.count-num          { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; line-height: 1; color: var(--ink); }
.count-num.out      { color: var(--burgundy); }
.count-lbl          { font-size: 10px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-ghost); }
.subject-detail-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--paper-deep); padding-top: 10px; margin-top: 4px; }
.overdue-badge      { font-size: 10px; font-weight: 600; letter-spacing: 0.05em; color: var(--burgundy); background: var(--burg-lt); padding: 2px 8px; border-radius: var(--r-pill); display: none; }
.overdue-badge.show { display: inline-block; }

/* Detail drawer */
.detail-drawer {
  background: var(--paper-cream);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  display: none;
  animation: fadeUp 0.25s ease;
}
.detail-drawer.open { display: block; }
.drawer-header      { padding: 16px 22px 12px; border-bottom: 1px solid var(--paper-deep); display: flex; align-items: center; justify-content: space-between; }
.drawer-title       { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.drawer-body        { padding: 18px 22px; }

/* Copy rows inside drawer */
.copy-row           { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--paper-warm); }
.copy-row:last-child{ border-bottom: none; }
.copy-id            { font-family: monospace; font-size: 11px; font-weight: 600; color: var(--slate); background: var(--slate-lt); padding: 2px 7px; border-radius: 5px; flex-shrink: 0; }
.copy-student       { flex: 1; font-size: 13px; font-weight: 500; color: var(--ink); }
.copy-days          { font-size: 11px; color: var(--ink-soft); }
.copy-days.late     { color: var(--burgundy); font-weight: 600; }
.copy-status-in     { font-size: 10px; font-weight: 600; color: var(--forest);   background: var(--forest-lt); padding: 2px 8px; border-radius: var(--r-pill); }
.copy-status-out    { font-size: 10px; font-weight: 600; color: var(--burgundy); background: var(--burg-lt);   padding: 2px 8px; border-radius: var(--r-pill); }

/* Empty state */
.tb-empty       { text-align: center; padding: 60px 24px; grid-column: 1 / -1; }
.tb-empty-icon  { font-size: 52px; opacity: 0.25; margin-bottom: 14px; }
.tb-empty-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.tb-empty-body  { font-size: 13px; color: var(--ink-soft); max-width: 320px; margin: 0 auto 20px; line-height: 1.65; }

/* Print labels */
@media print {
  body * { visibility: hidden; }
  .label-sheet, .label-sheet * { visibility: visible; }
  .label-sheet { position: absolute; left: 0; top: 0; width: 100%; }
  .label-print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .label-print-item { border: 1px dashed #bbb; border-radius: 4px; padding: 8px; text-align: center; page-break-inside: avoid; }
  .label-print-item svg { max-width: 100%; height: 44px; }
  .lp-title  { font-size: 8px; font-weight: 600; font-family: Arial, sans-serif; margin-top: 4px; line-height: 1.3; }
  .lp-id     { font-size: 9px; font-family: monospace; color: #444; margin-top: 1px; }
  .lp-school { font-size: 7px; color: #999; font-family: Arial, sans-serif; margin-top: 1px; }
}

/* Textbook responsive */
@media (max-width: 860px) {
  .scan-bar { flex-direction: column; align-items: flex-start; }
  .scan-input-wrap { width: 100%; max-width: 100%; }
}
@media (max-width: 620px) {
  .tb-content { padding: 20px 16px 40px; }
  .scan-bar   { padding: 12px 16px; }
  .subject-grid { grid-template-columns: 1fr; }
}
