/* ==========================================================================
   StitchForge — design system
   Warm paper UI for the product, deep ink marketing site.
   ========================================================================== */

:root {
  --ink: #111714;
  --ink-2: #18211c;
  --ink-3: #223029;
  --paper: #f5f2ea;
  --panel: #fffdf8;
  --panel-2: #faf7f0;
  --line: #e5dfd2;
  --line-2: #d8d0bf;
  --text: #1d2520;
  --muted: #6d756d;
  --muted-2: #8d958c;
  --gold: #cf9426;
  --gold-2: #f0c46b;
  --gold-soft: #f7e9c9;
  --teal: #1f7a6b;
  --teal-soft: #dcefe9;
  --red: #c04a3d;
  --red-soft: #f7e2de;
  --blue: #3b6ea8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(30, 35, 28, 0.10);
  --shadow-sm: 0 6px 18px rgba(30, 35, 28, 0.07);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--gold-soft); }

.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.serif { font-family: var(--serif); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-gold { background: var(--gold); color: #201707; }
.btn-gold:hover { background: #e0a333; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--panel); border-color: var(--muted-2); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--panel-2); }
.btn-danger { background: transparent; color: var(--red); border-color: #ecc9c3; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { border-color: var(--muted-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Marketing ---------- */
.site { background: var(--ink); color: #f4f1e8; overflow-x: hidden; }
.site a { color: inherit; }
.site-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(207, 148, 38, .16), transparent 65%),
    radial-gradient(700px 500px at 8% 35%, rgba(31, 122, 107, .12), transparent 70%);
}
.nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand-name { font-size: 17px; }
.nav-links { display: flex; gap: 30px; font-size: 14px; color: rgba(244, 241, 232, .72); }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.site .btn-ghost { color: #f4f1e8; border-color: rgba(255, 255, 255, .18); }
.site .btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .35); }
.site .btn-gold { color: #241a06; }

.hero { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; padding: 70px 0 90px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-2); font-weight: 700;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 5.2vw, 70px); line-height: 1.03; letter-spacing: -.025em; margin: 20px 0 22px; }
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero p.lead { font-size: 17px; line-height: 1.65; color: rgba(244, 241, 232, .70); max-width: 560px; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { display: flex; gap: 18px; margin-top: 26px; font-size: 12.5px; color: rgba(244, 241, 232, .52); flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 14px; height: 14px; color: var(--gold-2); }

.hero-visual { position: relative; }
.preview-frame {
  position: relative; border-radius: 22px; padding: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transform: rotate(-1.6deg);
}
.preview-frame img { border-radius: 15px; width: 100%; }
.preview-frame::after {
  content: ""; position: absolute; inset: 12px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14); pointer-events: none;
}
.float-card {
  position: absolute; background: rgba(18, 25, 21, .93); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px; padding: 12px 15px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px); font-size: 12px;
}
.float-card .k { color: rgba(244, 241, 232, .58); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; }
.float-card .v { font-weight: 700; font-size: 15px; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.float-a { top: 26px; left: -30px; }
.float-b { bottom: 30px; right: -18px; }
.float-c { bottom: -22px; left: 38px; }
.format-row { display: flex; gap: 7px; margin-top: 10px; }
.format-chip {
  border: 1px solid rgba(255, 255, 255, .17); border-radius: 7px; padding: 5px 8px;
  font: 600 10.5px var(--mono); color: rgba(244, 241, 232, .8);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #63c79a; display: inline-block; box-shadow: 0 0 0 3px rgba(99, 199, 154, .16); }
.dot.gold { background: var(--gold-2); box-shadow: 0 0 0 3px rgba(240, 196, 107, .16); }

.trust-strip { position: relative; z-index: 2; border-top: 1px solid rgba(255, 255, 255, .09); border-bottom: 1px solid rgba(255, 255, 255, .09); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 26px 24px; border-right: 1px solid rgba(255, 255, 255, .09); }
.trust-item:last-child { border-right: 0; }
.trust-item .n { font-family: var(--serif); font-size: 28px; color: var(--gold-2); }
.trust-item .l { font-size: 12.5px; color: rgba(244, 241, 232, .58); margin-top: 3px; }

.section { position: relative; z-index: 2; padding: 92px 0; }
.section-head { max-width: 680px; margin-bottom: 46px; }
.section-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 14px 0 14px; }
.section-head p { color: rgba(244, 241, 232, .62); font-size: 16px; line-height: 1.65; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 18px; }
.step .num { font: 600 11px var(--mono); color: var(--gold-2); letter-spacing: .1em; }
.step h3 { font-size: 16px; margin: 12px 0 8px; }
.step p { font-size: 13.5px; line-height: 1.6; color: rgba(244, 241, 232, .58); }

.limit-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
.limit-card { border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 28px; background: rgba(255, 255, 255, .03); }
.limit-card h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.limit-card p { color: rgba(244, 241, 232, .6); font-size: 14px; line-height: 1.65; }
.limit-list { display: grid; gap: 12px; margin-top: 20px; }
.limit-item { display: flex; gap: 11px; font-size: 13.5px; color: rgba(244, 241, 232, .76); line-height: 1.5; }
.limit-item .x { color: #e08b7e; flex: 0 0 auto; margin-top: 1px; }
.limit-item .check { color: #74c9a6; flex: 0 0 auto; margin-top: 1px; }
.checklist { display: grid; gap: 10px; margin-top: 18px; }

.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.price-card {
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 18px; padding: 24px;
  background: rgba(255, 255, 255, .025); display: flex; flex-direction: column; min-height: 100%;
}
.price-card.featured { border-color: rgba(240, 196, 107, .55); background: linear-gradient(180deg, rgba(207, 148, 38, .15), rgba(207, 148, 38, .03)); position: relative; }
.price-card .tag { position: absolute; top: -11px; left: 22px; background: var(--gold); color: #241a06; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 5px; }
.price-card h3 { font-size: 15px; }
.price-card .price { font-family: var(--serif); font-size: 42px; margin: 10px 0 2px; letter-spacing: -.03em; }
.price-card .price span { font: 500 12px var(--sans); color: rgba(244, 241, 232, .5); letter-spacing: 0; }
.price-card .blurb { font-size: 12.5px; color: rgba(244, 241, 232, .55); min-height: 34px; line-height: 1.45; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 9px; font-size: 12.5px; color: rgba(244, 241, 232, .76); }
.price-card li { display: flex; gap: 8px; }
.price-card li svg { width: 14px; height: 14px; color: var(--gold-2); flex: 0 0 auto; margin-top: 1px; }
.price-card .btn { margin-top: auto; }
.price-card .btn-ghost { color: #f4f1e8; border-color: rgba(255, 255, 255, .2); }
.pricing-note { text-align: center; margin-top: 22px; font-size: 12px; color: rgba(244, 241, 232, .4); }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
details.faq-item { border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; }
details.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 14.5px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; color: var(--gold-2); font-weight: 400; font-size: 18px; line-height: 1; }
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { color: rgba(244, 241, 232, .58); font-size: 13.5px; line-height: 1.65; margin-top: 12px; max-width: 92%; }

.cta-band { border-top: 1px solid rgba(255, 255, 255, .1); padding: 80px 0; position: relative; z-index: 2; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.02em; }
.cta-inner p { color: rgba(244, 241, 232, .55); margin-top: 8px; font-size: 14px; }
.footer { border-top: 1px solid rgba(255, 255, 255, .1); padding: 30px 0 40px; display: flex; justify-content: space-between; gap: 20px; align-items: center; color: rgba(244, 241, 232, .42); font-size: 12px; position: relative; z-index: 2; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; }
.footer a:hover { color: rgba(244, 241, 232, .8); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); }
.auth-side { background: var(--ink); color: #f4f1e8; padding: 46px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .glow { position: absolute; inset: 0; background: radial-gradient(600px 400px at 20% 80%, rgba(207, 148, 38, .18), transparent 70%); }
.auth-side .brand { position: relative; z-index: 2; }
.auth-quote { position: relative; z-index: 2; max-width: 430px; }
.auth-quote .q { font-family: var(--serif); font-size: 32px; line-height: 1.25; letter-spacing: -.02em; }
.auth-quote .who { margin-top: 20px; color: rgba(244, 241, 232, .55); font-size: 13px; }
.auth-mini { position: relative; z-index: 2; display: flex; gap: 10px; align-items: center; font-size: 12px; color: rgba(244, 241, 232, .5); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 46px 28px; }
.auth-card { width: min(430px, 100%); }
.auth-card h1 { font-family: var(--serif); font-size: 38px; font-weight: 500; letter-spacing: -.025em; }
.auth-card .sub { color: var(--muted); margin: 10px 0 28px; font-size: 14px; line-height: 1.5; }
.auth-card .switch { margin-top: 22px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-card .switch a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.demo-box { margin-top: 18px; background: var(--gold-soft); border: 1px solid #ead3a2; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #6b4c12; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-box code { font-family: var(--mono); font-size: 11.5px; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; background: var(--paper); }
.sidebar {
  width: 252px; flex: 0 0 252px; background: var(--ink); color: #e9e6dc;
  display: flex; flex-direction: column; padding: 22px 16px 18px; position: fixed; inset: 0 auto 0 0; z-index: 30;
}
.sidebar .brand { padding: 0 8px 20px; }
.sidebar .brand-name { color: #f5f2e9; }
.workspace {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); margin-bottom: 18px;
}
.workspace .avatar { background: linear-gradient(135deg, var(--gold), #9c6a12); color: #1c1405; }
.workspace .w-name { font-size: 12.5px; font-weight: 600; color: #f3f0e7; line-height: 1.2; }
.workspace .w-plan { font-size: 10.5px; color: rgba(233, 230, 220, .48); text-transform: capitalize; margin-top: 2px; }
.workspace svg { width: 13px; height: 13px; margin-left: auto; color: rgba(233, 230, 220, .4); }
.side-nav { display: grid; gap: 2px; }
.side-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(233, 230, 220, .32); padding: 16px 12px 7px; }
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: rgba(233, 230, 220, .64); transition: background .15s, color .15s;
}
.side-item svg { width: 17px; height: 17px; opacity: .8; }
.side-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-item.active { background: rgba(240, 196, 107, .12); color: var(--gold-2); }
.side-item.active svg { opacity: 1; }
.side-item .count { margin-left: auto; font-size: 10.5px; background: rgba(255, 255, 255, .08); border-radius: 20px; padding: 2px 7px; }
.side-bottom { margin-top: auto; }
.credit-mini { border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); border-radius: 11px; padding: 13px; margin-bottom: 12px; }
.credit-mini .top { display: flex; justify-content: space-between; font-size: 11px; color: rgba(233, 230, 220, .55); }
.credit-mini .num { font-family: var(--serif); font-size: 27px; color: #f6f2e6; margin: 4px 0 8px; }
.credit-mini .num span { font: 500 11px var(--sans); color: rgba(233, 230, 220, .45); }
.credit-mini .btn { width: 100%; padding: 8px; font-size: 11.5px; background: rgba(240, 196, 107, .14); color: var(--gold-2); border: 1px solid rgba(240, 196, 107, .25); }
.credit-mini .btn:hover { background: rgba(240, 196, 107, .2); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.side-user:hover { background: rgba(255, 255, 255, .05); }
.side-user .u-name { font-size: 12px; color: #eee9dc; font-weight: 600; }
.side-user .u-mail { font-size: 10.5px; color: rgba(233, 230, 220, .4); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-3); color: #fff; font-size: 11.5px; font-weight: 700; flex: 0 0 auto;
}
.avatar.lg { width: 40px; height: 40px; font-size: 13px; }

.main { flex: 1; min-width: 0; margin-left: 252px; display: flex; flex-direction: column; }
.topbar {
  height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(245, 242, 234, .82);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 7px; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.credit-pill { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 30px; padding: 7px 13px; font-size: 12px; font-weight: 600; }
.credit-pill svg { width: 14px; height: 14px; color: var(--gold); }
.content { padding: 30px; width: 100%; max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -.025em; line-height: 1.1; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.page-head .actions { display: flex; gap: 9px; align-items: center; }

/* ---------- Cards & stats ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.card-head .sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.card-body { padding: 20px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.stat .ico svg { width: 16px; height: 16px; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-top: 14px; }
.stat .v { font-family: var(--serif); font-size: 32px; letter-spacing: -.02em; margin-top: 2px; }
.stat .hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.stat.gold .ico { background: var(--gold-soft); border-color: #eed7a9; color: #8c6213; }
.stat.teal .ico { background: var(--teal-soft); border-color: #c3e5db; color: var(--teal); }
.stat.red .ico { background: var(--red-soft); border-color: #ecc9c3; color: var(--red); }
.meter { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 12px; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), #e8b752); }

.grid-2 { display: grid; grid-template-columns: 1.55fr .95fr; gap: 18px; align-items: start; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.stack { display: grid; gap: 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--panel-2); }
.design-cell { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.thumb {
  width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: #efe9dc;
  border: 1px solid var(--line); flex: 0 0 auto;
}
.thumb.placeholder { display: grid; place-items: center; color: var(--muted-2); }
.thumb.placeholder svg { width: 18px; height: 18px; }
.design-cell .n { font-weight: 600; font-size: 13px; }
.design-cell .m { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 20px;
  padding: 4px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: #e2f1e9; color: #26704d; }
.badge.busy { background: var(--gold-soft); color: #8a5e0d; }
.badge.bad { background: var(--red-soft); color: #9c3428; }
.badge.neutral { background: #eeeae1; color: #6d716a; }
.badge.teal { background: var(--teal-soft); color: #146357; }
.badge.lg { font-size: 12px; padding: 6px 12px; }
.badge.no-dot::before { display: none; }

.patch-summary { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 13px; }
.patch-summary div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.patch-summary span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 700; }
.patch-summary b { display: block; font-size: 11px; margin-top: 2px; }
.thread-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.thread { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 8px 4px 4px; }
.thread i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.08); }

/* ---------- Library / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 180px; max-width: 360px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); font-size: 12.5px; }
.filters { display: flex; gap: 6px; }
.filter { padding: 7px 11px; border-radius: 7px; border: 1px solid transparent; font-size: 11.5px; color: var(--muted); }
.filter:hover { background: var(--panel-2); }
.filter.active { background: var(--ink); color: #fff; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; margin-bottom: 6px; }
.field .hint { font-size: 11px; color: var(--muted-2); margin-top: 5px; line-height: 1.45; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px;
  background: #fffefa; font-size: 13px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(207, 148, 38, .14); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d756d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 38px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted-2); }
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .t { font-size: 12.5px; font-weight: 600; }
.toggle-row .d { font-size: 11px; color: var(--muted-2); margin-top: 2px; line-height: 1.4; }
.switch { position: relative; width: 36px; height: 21px; flex: 0 0 auto; margin-top: 1px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #d9d3c6; transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #fff; left: 3px; top: 3px; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(15px); }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.check input { accent-color: var(--teal); width: 15px; height: 15px; }
.check.is-disabled { opacity: .5; cursor: not-allowed; }
.check.is-disabled em { font-style: normal; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--red); margin-left: 3px; }
.advanced summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: "+"; color: var(--muted-2); }
.advanced[open] summary::after { content: "–"; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.alert.error { background: var(--red-soft); color: #7e2c22; border: 1px solid #ecc9c3; }
.alert.warn { background: var(--gold-soft); color: #6d4b10; border: 1px solid #ead3a2; }
.alert.ok { background: var(--teal-soft); color: #145f54; border: 1px solid #c3e5db; }
.alert.info { background: #e8eef5; color: #2f5277; border: 1px solid #cfdcea; }

/* ---------- New design ---------- */
.create-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 20px; align-items: start; }
.preset-bar { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 10px 11px; margin-bottom: 12px; }
.preset-label { display: flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.preset-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.preset-btn { flex: 1 1 180px; text-align: left; border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px; padding: 8px 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.preset-btn:hover { border-color: var(--gold); }
.preset-btn.active { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.preset-btn b { display: block; font-size: 11px; color: var(--text); }
.preset-btn span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.preset-note { margin-top: 7px; font-size: 9.5px; color: var(--muted); line-height: 1.45; }
.preset-note.hidden { display: none; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode-option { padding: 12px 13px; }
.mode-option:last-child { grid-column: 1 / -1; }
.mode-option {
  position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px;
  border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--panel); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.mode-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mode-option:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.mode-option .mo-icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; }
.mode-option .mo-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mode-option .mo-title { font-weight: 700; font-size: 13px; }
.mode-option .mo-sub { font-size: 10.5px; color: var(--muted-2); line-height: 1.35; }
.toggle-row.is-off { opacity: .45; }
.dropzone {
  display: block; border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 34px 24px; text-align: center;
  background: var(--panel-2); cursor: pointer; transition: border-color .15s, background .15s; position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: #fdf7e8; }
.dropzone .dz-icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 13px; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; }
.dropzone .dz-icon svg { width: 21px; height: 21px; }
.dropzone .dz-title { display: block; font-weight: 700; font-size: 14px; }
.dropzone .dz-sub { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.art-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#f0ece2 0% 25%, #f8f5ee 0% 50%) 50% / 16px 16px; }
.art-preview img { width: 100%; max-height: 320px; object-fit: contain; }
.analysis { margin-top: 14px; }
.analysis-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
.metric { background: var(--panel); padding: 9px 11px; }
.metric .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.metric .v { font-size: 13px; font-weight: 700; margin-top: 2px; }
.samples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sample-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 6px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; }
.sample-btn img { width: 28px; height: 28px; object-fit: contain; border-radius: 5px; background: #f4f0e6; }
.sample-btn:hover { border-color: var(--gold); }
.sample-btn.active { border-color: var(--gold); background: var(--gold-soft); }
.patch-box { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.patch-box .patch-check { align-items: flex-start; gap: 8px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.patch-box .patch-check input { margin-top: 2px; }
.patch-box .patch-check b { color: var(--text); }
.patch-options { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.mini-check { font-size: 9.5px; color: var(--muted); margin-top: 4px; gap: 4px; }
.hybrid-check { align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.hybrid-check b { color: var(--text); }
.patch-options.hidden { display: none; }
.thread-chart { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 9px; }
.thread-chart:not([open]) > .thread-chart-grid { display: none; }
.thread-chart summary { cursor: pointer; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.thread-chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; max-height: 220px; overflow: auto; }
.thread-swatch { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.thread-swatch i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; }
.subject-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.subject-chip { font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 9px; }

/* ---------- Design detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.42fr .88fr; gap: 18px; align-items: start; }
.preview-panel { overflow: hidden; }
.preview-stage { background: #eee8da; display: grid; place-items: center; padding: 18px; min-height: 300px; }
.preview-stage img { border-radius: 8px; box-shadow: var(--shadow-sm); max-height: 620px; width: auto; max-width: 100%; }
.preview-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; align-items: start; }
.preview-compare figure { margin: 0; min-width: 0; }
.preview-compare img { width: 100%; height: auto; max-height: 520px; object-fit: contain; background: #f4f0e6; }
.preview-compare figcaption { margin-top: 7px; font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
.preview-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tab { font-size: 11px; padding: 6px 10px; border-radius: 6px; color: var(--muted); cursor: pointer; border: 1px solid transparent; background: none; }
.tab.active { background: var(--ink); color: #fff; }
.processing { padding: 30px 26px; }
.processing h3 { font-size: 14px; }
.progress { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 14px 0 8px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e9bd63); transition: width .5s ease; }
.timeline { display: grid; gap: 0; margin-top: 18px; }
.tl-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding-bottom: 14px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; z-index: 1; }
.tl-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.tl-item.done .tl-dot { background: var(--teal); border-color: var(--teal); }
.tl-item.done .tl-dot::after { background: #fff; }
.tl-item.current .tl-dot { border-color: var(--gold); }
.tl-item.current .tl-dot::after { background: var(--gold); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.tl-text .s { font-size: 12px; font-weight: 600; }
.tl-text .m { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.tl-time { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stat-cell { background: var(--panel); padding: 12px 14px; }
.stat-cell .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2); }
.stat-cell .v { font-size: 17px; font-weight: 700; margin-top: 3px; font-family: var(--serif); letter-spacing: -.01em; }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.download {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 10px; background: var(--panel-2); transition: border-color .14s, background .14s;
}
.download:hover { border-color: var(--gold); background: var(--gold-soft); }
.download .f { font: 700 11px var(--mono); }
.download .s { font-size: 9.5px; color: var(--muted-2); }
.download svg { width: 15px; height: 15px; margin-left: auto; color: var(--muted-2); }
.qa-check { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.qa-check:last-child { border-bottom: 0; }
.qa-dot { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.qa-dot svg { width: 10px; height: 10px; }
.qa-dot.pass { background: var(--teal-soft); color: #167061; }
.qa-dot.warn { background: var(--gold-soft); color: #8a5e0d; }
.qa-dot.fail { background: var(--red-soft); color: var(--red); }
.qa-label { font-size: 12px; font-weight: 600; }
.qa-detail { font-size: 10.5px; color: var(--muted-2); margin-top: 1px; line-height: 1.4; }
.score-ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) calc(var(--score) * 1%), var(--line) 0); position: relative; flex: 0 0 auto; }
.score-ring::before { content: ""; position: absolute; inset: 7px; background: var(--panel); border-radius: 50%; }
.score-ring b { position: relative; font-size: 19px; font-family: var(--serif); }
.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.note-list li { font-size: 11.5px; line-height: 1.5; color: #6d4b10; background: var(--gold-soft); border: 1px solid #ead3a2; border-radius: 8px; padding: 9px 11px; }
.empty { padding: 50px 24px; text-align: center; }
.empty .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted-2); }
.empty h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.empty p { font-size: 12.5px; color: var(--muted); margin: 6px 0 16px; }

/* ---------- Billing ---------- */
.billing-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 20px; }
.credit-big { display: flex; align-items: center; gap: 22px; }
.credit-big .num { font-family: var(--serif); font-size: 58px; letter-spacing: -.04em; line-height: 1; }
.credit-big .lbl { font-size: 12px; color: var(--muted); }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--panel); display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 122, 107, .08); }
.plan-card h3 { font-size: 13px; }
.plan-card .p { font-family: var(--serif); font-size: 28px; margin: 4px 0 2px; }
.plan-card .p span { font: 500 10px var(--sans); color: var(--muted-2); }
.plan-card ul { list-style: none; padding: 0; margin: 10px 0 14px; font-size: 10.5px; color: var(--muted); display: grid; gap: 5px; }
.plan-card .btn { margin-top: auto; width: 100%; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { border: 1px solid var(--line); border-radius: 9px; padding: 12px; text-align: center; background: var(--panel-2); }
.pack .n { font-family: var(--serif); font-size: 22px; }
.pack .d { font-size: 10px; color: var(--muted-2); }
.pack button { margin-top: 8px; width: 100%; }
.ledger { font-size: 11.5px; }
.ledger-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .r { color: var(--muted); font-size: 11px; }
.ledger-row .d { font-weight: 700; }
.ledger-row .d.neg { color: var(--red); }
.ledger-row .d.pos { color: var(--teal); }

/* ---------- Team / settings ---------- */
.member { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member .n { font-size: 13px; font-weight: 600; }
.member .m { font-size: 11px; color: var(--muted-2); }
.member .role { margin-left: auto; }
.invite-link { margin-top: 14px; padding: 12px; border: 1px solid #ead3a2; background: var(--gold-soft); border-radius: 9px; }
.invite-link .u { font: 11px var(--mono); word-break: break-all; margin-top: 6px; color: #5e4210; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.key-row code { font: 11.5px var(--mono); background: var(--panel-2); border: 1px solid var(--line); padding: 4px 7px; border-radius: 5px; }
.key-row .meta { font-size: 10.5px; color: var(--muted-2); }
.key-row .act { margin-left: auto; }
.key-reveal { background: var(--ink); color: #f1ecdf; border-radius: 10px; padding: 13px 14px; margin-bottom: 16px; }
.key-reveal .k { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.key-reveal code { display: block; font: 12px var(--mono); margin-top: 7px; word-break: break-all; color: #fff; }

/* ---------- Docs ---------- */
.docs { max-width: 820px; }
.docs h2 { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 34px 0 12px; }
.docs h3 { font-size: 14px; margin: 24px 0 8px; }
.docs p, .docs li { font-size: 13px; line-height: 1.7; color: var(--muted); }
.docs ul { padding-left: 18px; }
pre.code { background: var(--ink); color: #e9e3d4; border-radius: 10px; padding: 16px 18px; overflow-x: auto; font: 12px/1.65 var(--mono); margin: 12px 0; }
pre.code .c { color: #8a958c; }
pre.code .s { color: #e6c27a; }
.inline-code { font: 12px var(--mono); background: var(--panel-2); border: 1px solid var(--line); padding: 2px 5px; border-radius: 4px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 100; display: grid; gap: 8px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: var(--ink); color: #f3efe4;
  border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.45;
  animation: toast-in .25s ease;
}
.toast.err { background: #4a201b; }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--gold-2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 5px 0; }
.kv .k { color: var(--muted-2); }
.kv .v { font-weight: 600; }
.pill-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: 5px 9px; border-radius: 20px; }
.link { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mobile-only { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 46px; padding-top: 40px; }
  .hero-visual { max-width: 560px; }
  .float-a { left: -12px; }
  .float-b { right: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .create-grid, .detail-grid, .billing-hero { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 820px) {
  .container { width: calc(100% - 32px); }
  .nav-links { display: none; }
  .nav { padding: 16px 0; }
  .hero { padding: 34px 0 60px; }
  .hero h1 { font-size: 40px; }
  .hero-note { gap: 10px; }
  .section { padding: 64px 0; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item { border-bottom: 1px solid rgba(255,255,255,.09); }
  .limit-grid, .faq { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 40px; }
  .page-head h1 { font-size: 28px; }
  .mobile-only { display: inline-flex; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .design-cell { min-width: 160px; }
  .table-wrap table.data th:nth-child(4), .table-wrap table.data td:nth-child(4) { display: none; }
}
@media (max-width: 520px) {
  .stat-grid, .pack-grid, .checkbox-grid, .plan-grid { grid-template-columns: 1fr; }
  .mode-switch { grid-template-columns: 1fr; }
  .mode-option:last-child { grid-column: auto; }
  .hero h1 { font-size: 34px; }
  .hero-actions .btn { width: 100%; }
  .float-card { display: none; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .preview-stage { padding: 10px; }
  .preview-compare { grid-template-columns: 1fr; }
  table.data th:nth-child(3), table.data td:nth-child(3) { display: none; }
}
