/* ═══════════════════════════════════════════════════════════════
   QUICK INVOICE HUB — Premium Design System
   Aesthetic: Luxury Financial · Deep Navy + Warm Gold + Cream
   Fonts: Playfair Display (headings) + DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800;900&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── TOKENS ── */
:root {
  --ink:     #0a1628;
  --ink-2:   #1e3a5f;
  --ink-3:   #4a6080;
  --ink-4:   #8aa3c0;
  --gold:    #d4920a;
  --gold-lt: #f5c842;
  --gold-bg: #fef9ee;
  --gold-br: rgba(212,146,10,.18);
  --cream:   #fdf8f0;
  --cream-2: #f7f0e4;
  --white:   #ffffff;
  --card:    #ffffff;
  --bg:      #f5f3ef;
  --border:  #e5ddd0;
  --border-2:#d4c9b8;
  --green:   #0f7a4f;
  --red:     #c0392b;
  --blue:    #1a4fa0;
  --sh-xs:   0 1px 3px rgba(10,22,40,.08);
  --sh-sm:   0 2px 8px rgba(10,22,40,.10);
  --sh-md:   0 6px 24px rgba(10,22,40,.12);
  --sh-lg:   0 16px 48px rgba(10,22,40,.15);
  --sh-xl:   0 32px 80px rgba(10,22,40,.18);
  --sh-gold: 0 8px 32px rgba(212,146,10,.25);
  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --nav-h: 68px;
  --max: 1120px;
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

[data-theme="dark"] {
  --ink:     #f0ead8;
  --ink-2:   #c8bfa8;
  --ink-3:   #8a7f6e;
  --ink-4:   #4a4030;
  --bg:      #0d1117;
  --card:    #161c26;
  --cream:   #1a1410;
  --cream-2: #1e1a14;
  --border:  #2a2218;
  --border-2:#3a3020;
  --gold-bg: #1a1408;
  --gold-br: rgba(212,146,10,.12);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; }
h3 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; }
.serif { font-family: 'Playfair Display', Georgia, serif; }
.label-xs { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-3); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--ink-3); }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--ink);
  box-shadow: 0 2px 0 var(--gold), var(--sh-md);
}
.nav-inner {
  max-width: 1380px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 8px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none !important; flex-shrink: 0;
}
.nav-brand-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-lt) 100%);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(212,146,10,.4);
  position: relative; overflow: hidden;
}
.nav-brand-mark::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.3) 0%, transparent 60%);
}
.nav-brand-text { line-height: 1.15; }
.nav-brand-name { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: white; }
.nav-brand-tag { font-size: 9.5px; font-weight: 500; color: rgba(255,255,255,.4); letter-spacing: .5px; }

/* search */
.nav-search { position: relative; flex: 1; max-width: 260px; margin: 0 10px; }
.nav-search-input {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 30px;
  color: white; font-size: 13px;
  padding: 9px 16px 9px 40px;
  outline: none;
  transition: all .2s;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.35); }
.nav-search-input:focus { background: rgba(255,255,255,.11); border-color: var(--gold); }
.nav-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.4); font-size: 14px; pointer-events: none; }
.nav-search-drop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 320px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh-xl); z-index: 9999;
  display: none; overflow: hidden;
  border-top: 3px solid var(--gold);
}
.nav-search-drop.open { display: block; animation: dropIn .15s var(--ease); }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.s-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; color: var(--ink); font-size: 13.5px; font-weight: 500;
  transition: background .12s; text-decoration: none !important;
  border-bottom: 1px solid var(--border);
}
.s-item:last-child { border-bottom: none; }
.s-item:hover { background: var(--gold-bg); }
.s-item-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.s-item-cat { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .5px; }

/* links */
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 auto; flex-shrink: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.75); font-size: 13.5px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-xs);
  transition: all .15s; text-decoration: none !important; white-space: nowrap;
}
.nav-links > li > a:hover, .nav-links > li > a.act { color: var(--gold-lt); background: rgba(255,255,255,.06); }
.nav-caret { width: 12px; height: 12px; transition: transform .2s; opacity: .5; flex-shrink: 0; }
/* dropdown - padding-top = invisible bridge */
.nav-dd, .nav-mega { position: absolute; top: 100%; left: 0; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, visibility .18s, transform .18s; pointer-events: none; z-index: 2000; }
.nav-links > li:hover > .nav-dd, .nav-links > li:hover > .nav-mega { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-links > li:hover > a .nav-caret { transform: rotate(180deg); }
.nav-dd-inner { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-xl); min-width: 230px; padding: 8px; border-top: 3px solid var(--gold); }
.nav-dd-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: var(--ink); font-size: 13.5px; font-weight: 500; border-radius: var(--r-xs); transition: background .12s; text-decoration: none !important; }
.nav-dd-item:hover { background: var(--gold-bg); color: var(--ink); }
.nav-dd-ico { font-size: 18px; width: 26px; text-align: center; }
.nav-dd-label { font-size: 10px; color: var(--ink-3); display: block; margin-top: 1px; }
/* mega */
.nav-mega { left: auto; right: -20px; }
.nav-mega-inner { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xl); padding: 24px; width: 720px; border-top: 3px solid var(--gold); }
.mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 20px; }
.mega-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); padding: 10px 8px 6px; border-bottom: 1.5px solid var(--gold-bg); margin-bottom: 4px; }
.mega-link { display: flex; align-items: center; gap: 9px; padding: 8px 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; border-radius: var(--r-xs); transition: all .12s; text-decoration: none !important; }
.mega-link:hover { background: var(--gold-bg); color: var(--ink); }
.mega-link-ico { font-size: 15px; flex-shrink: 0; }
.mega-all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 11px; background: var(--ink); color: white !important; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .15s; }
.mega-all:hover { background: var(--gold); color: var(--ink) !important; }

/* nav end */
.nav-end { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.12); border-radius: var(--r-xs); color: white; font-size: 16px; transition: all .15s; cursor: pointer; }
.btn-icon:hover { border-color: var(--gold); background: rgba(212,146,10,.15); }
.btn-ham { display: none; }

/* mobile nav */
.mob-nav { display: none; position: fixed; inset: 0; background: var(--ink); z-index: 999; overflow-y: auto; padding: 80px 0 120px; flex-direction: column; }
.mob-nav.open { display: flex; }
.mob-search-wrap { padding: 0 20px 20px; position: relative; }
.mob-search-wrap input { width: 100%; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.14); border-radius: 30px; color: white; font-size: 14px; padding: 12px 16px 12px 42px; outline: none; }
.mob-search-wrap input::placeholder { color: rgba(255,255,255,.35); }
.mob-si { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.4); }
.mob-links a { display: block; padding: 13px 24px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.05); text-decoration: none !important; }
.mob-links a:hover { background: rgba(255,255,255,.06); color: white; }
.mob-cat { padding: 16px 24px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); }

/* ── PAGE LAYOUT ── */
.page { max-width: var(--max); margin: 0 auto; padding: 36px 24px 80px; }
.page-wide { max-width: 1200px; margin: 0 auto; padding: 36px 24px 80px; }
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; flex-wrap: wrap; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--gold); }
.crumb-sep { color: var(--border-2); }

/* ── HERO SECTIONS ── */
.hero {
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 56px 52px;
  color: white;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero-bg-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(212,146,10,.18) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(30,58,95,.6) 0%, transparent 50%);
}
.hero-bg-dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .04;
  background-image: radial-gradient(circle, white 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(212,146,10,.15); border: 1px solid rgba(212,146,10,.3); color: var(--gold-lt); border-radius: 30px; padding: 5px 16px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 900; color: white; line-height: 1.1; margin-bottom: 16px; }
.hero h1 .accent { color: var(--gold-lt); }
.hero-sub { font-size: 17px; color: rgba(255,255,255,.65); max-width: 560px; margin-bottom: 32px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 5px 14px; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.7); }
/* hero visual (right side) */
.hero-visual { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); opacity: .07; font-size: 160px; user-select: none; pointer-events: none; }

/* page hero (smaller) */
.pg-hero {
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 40px 44px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.pg-hero::before { content: ''; position: absolute; top: -60px; right: -60px; width: 240px; height: 240px; background: radial-gradient(circle, rgba(212,146,10,.2) 0%, transparent 70%); pointer-events: none; }
.pg-hero-content { position: relative; z-index: 1; }
.pg-hero h1 { font-size: clamp(24px, 3.5vw, 38px); font-weight: 800; color: white; margin-bottom: 8px; }
.pg-hero-sub { font-size: 15.5px; color: rgba(255,255,255,.6); max-width: 560px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14.5px; border: none; border-radius: var(--r-sm); cursor: pointer; transition: all .2s var(--ease); text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: white; padding: 12px 26px; box-shadow: 0 4px 16px rgba(212,146,10,.35); }
.btn-primary:hover { background: var(--ink); color: white; box-shadow: var(--sh-md); }
.btn-navy { background: var(--ink); color: white; padding: 12px 26px; }
.btn-navy:hover { background: var(--gold); color: white; box-shadow: var(--sh-gold); }
.btn-outline { background: transparent; color: white; padding: 11px 24px; border: 1.5px solid rgba(255,255,255,.25); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--gold-lt); color: var(--gold-lt); }
.btn-outline-dark { background: transparent; color: var(--ink); padding: 11px 24px; border: 1.5px solid var(--border-2); }
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 9px 16px; }
.btn-ghost:hover { background: var(--cream-2); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: #e53935; color: white; padding: 6px 10px; font-size: 12px; }
.btn-danger:hover { background: #c62828; }

/* ── FORMS ── */
.fl { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-3); margin-bottom: 7px; }
.fc {
  width: 100%; background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink); font-size: 14.5px;
  padding: 11px 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fc:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,146,10,.12); }
.fc::placeholder { color: var(--ink-4); }
select.fc { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%238aa3c0' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.fc { resize: vertical; min-height: 88px; }
[data-theme="dark"] .fc { background: var(--cream-2); }
.fg { margin-bottom: 18px; }
.fi-group { display: flex; }
.fi-pre { background: var(--cream); border: 1.5px solid var(--border); border-right: none; border-radius: var(--r-sm) 0 0 var(--r-sm); padding: 11px 14px; font-size: 14px; font-weight: 700; color: var(--ink-3); white-space: nowrap; display: flex; align-items: center; }
.fi-group .fc { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.f2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── CARDS ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.cp { padding: 24px; }
.cp-lg { padding: 32px; }

/* ── RESULT BOX ── */
.result-box {
  background: var(--ink);
  border-radius: var(--r-xl);
  padding: 32px;
  color: white;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeUp .3s var(--ease);
}
.result-box::before { content: ''; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(212,146,10,.2) 0%, transparent 65%); pointer-events: none; }
.result-box::after { content: ''; position: absolute; bottom: -20px; left: -20px; width: 120px; height: 120px; background: radial-gradient(circle, rgba(30,58,95,.5) 0%, transparent 70%); pointer-events: none; }
.result-main { font-family: 'Playfair Display', serif; font-size: 42px; font-weight: 900; color: var(--gold-lt); line-height: 1; margin-bottom: 6px; position: relative; z-index: 1; }
.result-lbl { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.5); position: relative; z-index: 1; }
.result-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-top: 24px; position: relative; z-index: 1; }
.result-cell { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-sm); padding: 16px; backdrop-filter: blur(4px); }
.result-cell-val { font-size: 20px; font-weight: 700; color: var(--gold-lt); }
.result-cell-lbl { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 3px; }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ── TOOL CARDS ── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 32px; }
.tool-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex; align-items: flex-start; gap: 16px;
  text-decoration: none !important;
  color: var(--ink);
  transition: all .22s var(--ease);
  position: relative; overflow: hidden;
}
.tool-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); transform: scaleX(0); transition: transform .22s var(--ease); transform-origin: left; }
.tool-card:hover { border-color: var(--gold); box-shadow: var(--sh-gold); transform: translateY(-3px); }
.tool-card:hover::after { transform: scaleX(1); }
.tc-ico { width: 52px; height: 52px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; background: var(--gold-bg); }
.tc-name { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.tc-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

/* hub cards */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.hub-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 16px; text-align: center;
  text-decoration: none !important; color: var(--ink);
  transition: all .2s var(--ease); position: relative; overflow: hidden;
}
.hub-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(212,146,10,.06) 0%, transparent 70%); opacity: 0; transition: opacity .2s; }
.hub-card:hover { border-color: var(--gold); box-shadow: var(--sh-md); transform: translateY(-2px); }
.hub-card:hover::before { opacity: 1; }
.hc-ico { font-size: 30px; margin-bottom: 10px; }
.hc-name { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.hc-cat { font-size: 10.5px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .6px; }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.fb-btn { padding: 8px 20px; border-radius: 30px; border: 1.5px solid var(--border-2); background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.fb-btn:hover { border-color: var(--gold); color: var(--ink); }
.fb-btn.on { background: var(--ink); border-color: var(--ink); color: white; }

/* section head */
.sh { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sh-line { height: 3px; width: 32px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); border-radius: 2px; }
.sh-text { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; color: var(--gold); }

/* ── INVOICE LAYOUT ── */
.inv-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.inv-section { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 18px; position: relative; overflow: hidden; }
.inv-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.inv-sec-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1.5px solid var(--gold-bg); display: flex; align-items: center; gap: 8px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.logo-upload-zone { border: 2px dashed var(--border-2); border-radius: var(--r); padding: 20px; text-align: center; cursor: pointer; transition: all .2s; background: var(--cream); min-height: 90px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.logo-upload-zone:hover { border-color: var(--gold); background: var(--gold-bg); }
.logo-upload-zone .lu-ico { font-size: 28px; color: var(--ink-4); }
.logo-upload-zone .lu-txt { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
/* Items table */
.inv-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.inv-table thead th { background: var(--ink); color: white; padding: 11px 12px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.inv-table thead th:first-child { border-radius: var(--r-sm) 0 0 0; }
.inv-table thead th:last-child { border-radius: 0 var(--r-sm) 0 0; }
.inv-table tbody td { padding: 8px 6px; border-bottom: 1.5px solid var(--border); vertical-align: middle; }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-table input, .inv-table select { padding: 8px 10px; font-size: 13.5px; border-radius: var(--r-xs); border: 1.5px solid var(--border); background: var(--white); color: var(--ink); width: 100%; outline: none; font-family: 'DM Sans', sans-serif; transition: border-color .12s; }
.inv-table input:focus, .inv-table select:focus { border-color: var(--gold); background: var(--gold-bg); }
.add-item-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 20px; border-radius: var(--r-sm); border: 2px dashed var(--gold-br); background: var(--gold-bg); color: var(--gold); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s; }
.add-item-btn:hover { background: var(--gold); color: white; border-color: var(--gold); }
/* totals */
.inv-totals { border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--border); }
.inv-tot-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.inv-tot-row:last-child { border-bottom: none; background: var(--ink); border-radius: 0 0 var(--r-xs) var(--r-xs); }
.inv-tot-row:last-child .tot-lbl { color: white; font-weight: 600; }
.inv-tot-row:last-child .tot-val { color: var(--gold-lt); font-size: 20px; font-weight: 800; font-family: 'Playfair Display', serif; }
.tot-lbl { color: var(--ink-2); }
.tot-val { font-weight: 700; color: var(--ink); }
/* sidebar */
.inv-sidebar { position: sticky; top: 82px; }
.inv-side-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.inv-side-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }
.inv-tip-box { background: var(--gold-bg); border: 1.5px solid var(--gold-br); border-radius: var(--r-sm); padding: 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.inv-tip-box strong { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gold); margin-bottom: 6px; }

/* ── LIVE DATA ── */
.live-pill { display: inline-flex; align-items: center; gap: 6px; background: #dcfce7; color: #15803d; border: 1px solid #86efac; border-radius: 30px; padding: 4px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.live-dot { width: 7px; height: 7px; background: #22c55e; border-radius: 50%; animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.5)} }
.rate-hero { background: var(--ink); border-radius: var(--r-xl); padding: 32px 36px; color: white; margin-bottom: 24px; position: relative; overflow: hidden; }
.rate-hero::before { content: ''; position: absolute; top: -50px; right: -50px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(212,146,10,.2) 0%, transparent 70%); pointer-events: none; }
.rate-big { font-family: 'Playfair Display', serif; font-size: 48px; font-weight: 900; color: var(--gold-lt); line-height: 1; position: relative; z-index: 1; }
.rate-sub { font-size: 13.5px; color: rgba(255,255,255,.55); margin-top: 6px; position: relative; z-index: 1; }
.metal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 28px; }
.metal-card { background: var(--card); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 22px; transition: all .22s; cursor: pointer; }
.metal-card:hover, .metal-card.active { border-color: var(--gold); box-shadow: var(--sh-gold); }
.metal-card.active { background: var(--gold-bg); }
.mc-sym { font-size: 36px; margin-bottom: 10px; }
.mc-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); margin-bottom: 8px; }
.mc-inr { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.mc-usd { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.chg-up { color: #16a34a; font-size: 13px; font-weight: 700; margin-top: 6px; }
.chg-dn { color: #dc2626; font-size: 13px; font-weight: 700; margin-top: 6px; }
.data-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--border); }
.data-tbl th { background: var(--ink); color: white; padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.data-tbl td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.data-tbl tr:last-child td { border-bottom: none; }
.data-tbl tr:hover td { background: var(--gold-bg); }

/* ── SCIENTIFIC CALC ── */
.sci-wrap { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-md); }
.sci-display { background: var(--ink); padding: 20px 24px 14px; }
.sci-expr { font-size: 13.5px; color: rgba(255,255,255,.4); min-height: 22px; text-align: right; font-family: 'DM Mono', monospace; letter-spacing: .5px; }
.sci-val { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold-lt); text-align: right; word-break: break-all; line-height: 1.15; min-height: 46px; }
.sci-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px; background: var(--cream); }
.sb { padding: 15px 10px; border: none; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: all .12s; font-family: 'DM Sans', sans-serif; }
.sb:active { transform: scale(.94); }
.sb-num { background: var(--white); color: var(--ink); border: 1.5px solid var(--border); }
.sb-num:hover { background: var(--gold-bg); border-color: var(--gold-br); }
.sb-op { background: var(--cream-2); color: var(--ink-2); border: 1.5px solid var(--border); }
.sb-op:hover { background: var(--gold-bg); border-color: var(--gold); }
.sb-fn { background: rgba(10,22,40,.06); color: var(--ink); border: 1.5px solid var(--border); font-size: 11.5px; font-weight: 700; }
.sb-fn:hover { background: var(--ink); color: white; }
.sb-eq { background: var(--gold); color: white; font-size: 20px; box-shadow: var(--sh-gold); }
.sb-eq:hover { background: var(--ink); }
.sb-clr { background: #fff0ee; color: #c0392b; border: 1.5px solid #ffd5d0; }
.sb-clr:hover { background: #c0392b; color: white; }
.sb-zero { grid-column: span 2; }
[data-theme="dark"] .sci-grid { background: var(--cream-2); }
[data-theme="dark"] .sb-num { background: var(--cream); border-color: var(--border); }

/* ── INFO PAGES ── */
.info-hero { background: var(--ink); border-radius: var(--r-xl); padding: 56px 48px; color: white; margin-bottom: 32px; text-align: center; position: relative; overflow: hidden; }
.info-hero::before { content: ''; position: absolute; top: -60px; left: -60px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(212,146,10,.15) 0%, transparent 70%); pointer-events: none; }
.info-hero::after { content: ''; position: absolute; bottom: -60px; right: -60px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(30,58,95,.6) 0%, transparent 70%); pointer-events: none; }
.info-hero h1 { color: white; position: relative; z-index: 1; }
.info-hero p { font-size: 17px; color: rgba(255,255,255,.6); max-width: 520px; margin: 12px auto 0; position: relative; z-index: 1; }
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; margin-bottom: 20px; }
.info-card h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.info-card h2 .h2-bar { width: 4px; height: 22px; background: linear-gradient(180deg, var(--gold), var(--gold-lt)); border-radius: 2px; flex-shrink: 0; }
.info-card p, .info-card li { font-size: 14.5px; color: var(--ink-2); line-height: 1.78; }
.info-card ul { padding-left: 20px; }
.info-card li { margin-bottom: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; text-align: center; }
.stat-n { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 800; color: var(--gold); }
.stat-l { font-size: 12px; color: var(--ink-3); margin-top: 4px; font-weight: 600; }
.faq-item { border-bottom: 1.5px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer; gap: 12px; }
.faq-q.open { color: var(--gold); }
.faq-ico { font-size: 18px; color: var(--ink-4); transition: transform .2s; flex-shrink: 0; }
.faq-q.open .faq-ico { transform: rotate(180deg); color: var(--gold); }
.faq-a { display: none; padding: 0 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.72; }
.faq-a.open { display: block; }
.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.ci { display: flex; align-items: flex-start; gap: 16px; padding: 18px; background: var(--cream); border-radius: var(--r); margin-bottom: 12px; }
.ci-ico { width: 44px; height: 44px; background: var(--gold-bg); border: 1.5px solid var(--gold-br); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ci-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-4); margin-bottom: 3px; }
.ci-val { font-size: 14.5px; font-weight: 600; color: var(--ink); }

/* related */
.related-wrap { margin-top: 32px; padding-top: 24px; border-top: 1.5px solid var(--border); }
.related-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-4); margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rel-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r); padding: 15px; text-align: center; text-decoration: none !important; color: var(--ink); transition: all .15s; }
.rel-card:hover { border-color: var(--gold); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.rel-ico { font-size: 24px; margin-bottom: 6px; }
.rel-name { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }

/* tips bar */
.tip-bar { background: var(--gold-bg); border: 1.5px solid var(--gold-br); border-radius: var(--r-sm); padding: 13px 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 20px; }
.chart-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-top: 20px; }

/* ── ADS ── */
.ad-banner { text-align: center; padding: 10px 0; background: var(--cream); border-bottom: 1px solid var(--border); }
.ad-inline { text-align: center; margin: 28px 0; }
.ad-side-fixed { position: fixed; top: 50%; transform: translateY(-50%); z-index: 100; }
.ad-side-l { left: 6px; }
.ad-side-r { right: 6px; }
.ad-mob-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--border); text-align: center; padding: 4px 0; z-index: 998; display: none; }

/* ── FOOTER ── */
.site-footer { background: var(--ink); border-top: 4px solid var(--gold); padding: 56px 0 28px; margin-top: 60px; }
.footer-inner { max-width: 1380px; margin: 0 auto; padding: 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: white; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.footer-brand-ico { width: 36px; height: 36px; background: linear-gradient(135deg, var(--gold), var(--gold-lt)); border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.footer-tagline { font-size: 13.5px; color: rgba(255,255,255,.38); line-height: 1.65; max-width: 230px; }
.footer-col-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; color: var(--gold); margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13.5px; color: rgba(255,255,255,.42); transition: color .15s; text-decoration: none; }
.footer-links a:hover { color: var(--gold-lt); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 22px; font-size: 12.5px; color: rgba(255,255,255,.28); text-align: center; }
.footer-bottom a { color: rgba(255,255,255,.28); }
.footer-bottom a:hover { color: var(--gold); }

/* ── TOAST ── */
.toast-wrap { position: fixed; bottom: 90px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: white; padding: 13px 22px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-lg); border-left: 4px solid var(--gold); animation: toastSlide .25s var(--ease); }
@keyframes toastSlide { from { opacity:0; transform:translateX(22px); } to { opacity:1; transform:translateX(0); } }

/* ── PRINT ── */
@media print { .site-nav, .site-footer, .inv-sidebar, .ad-banner, .ad-inline, .ad-side-fixed, .add-item-btn, .btn-navy, .btn-gold, .btn-outline { display: none !important; } .inv-layout { display: block !important; } .inv-section { box-shadow: none !important; border: 1px solid #ccc !important; } }

/* ── RESPONSIVE ── */
@media (max-width: 1320px) { .ad-side-fixed { display: none !important; } }
@media (max-width: 960px) {
  .nav-search, .nav-links { display: none; }
  .btn-ham { display: flex; }
  .inv-layout, .inv-parties, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-mega-inner { width: 95vw; right: -10px; }
}
@media (max-width: 640px) {
  .hero { padding: 36px 24px; }
  .hero .hero-visual { display: none; }
  .f2col, .f3col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .page, .page-wide { padding: 20px 16px 80px; }
  .sci-grid { grid-template-columns: repeat(4, 1fr); }
  .ad-mob-bar { display: block; }
  .result-main { font-size: 32px; }
  .pg-hero { padding: 28px 22px; }
}

/* ── SEO Content Sections ── */
.seo-content{margin-top:48px;padding-top:32px;border-top:2px solid var(--border)}
.seo-content h2{font-family:'Playfair Display',serif;font-size:1.6rem;font-weight:700;color:var(--ink);margin-bottom:12px;margin-top:32px}
.seo-content h2:first-child{margin-top:0}
.seo-content h3{font-family:'Playfair Display',serif;font-size:1.15rem;font-weight:600;color:var(--ink);margin:20px 0 8px}
.seo-content p{color:var(--ink-2);line-height:1.8;margin-bottom:14px;font-size:15px}
.seo-content ul{color:var(--ink-2);line-height:1.8;padding-left:20px;margin-bottom:14px;font-size:15px}
.seo-content li{margin-bottom:6px}
.seo-formula{background:var(--cream);border:1.5px solid var(--gold-br, #e8c97a);border-radius:var(--r-md);padding:16px 20px;margin:16px 0;font-family:'DM Mono',monospace,sans-serif;font-size:14px;color:var(--ink);font-weight:600}
.seo-example{background:linear-gradient(135deg,rgba(10,22,40,.04),rgba(212,146,10,.06));border-left:3px solid var(--gold);padding:16px 20px;border-radius:0 var(--r-md) var(--r-md) 0;margin:16px 0}
.seo-example strong{color:var(--ink);font-weight:700}
.seo-tips{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}
.seo-tip{background:var(--card);border:1px solid var(--border);border-radius:var(--r-md);padding:14px 16px}
.seo-tip-icon{font-size:20px;margin-bottom:6px}
.seo-tip-title{font-weight:700;font-size:13px;color:var(--ink);margin-bottom:4px}
.seo-tip-text{font-size:13px;color:var(--ink-2);line-height:1.6}
@media(max-width:640px){.seo-tips{grid-template-columns:1fr}}
