:root {
  --night: #071426;
  --night-soft: #10233d;
  --ink: #10243f;
  --muted: #64748b;
  --paper: #f5f8fc;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 42, 70, 0.12);
  --cyan: #12cbe8;
  --cyan-dark: #067d9a;
  --purple: #8664f7;
  --pink: #ee6bc3;
  --lime: #68dfa9;
  --orange: #ff9a5a;
  --danger: #c9435d;
  --shadow: 0 24px 70px rgba(25, 50, 82, 0.13);
  --shadow-small: 0 12px 35px rgba(25, 50, 82, 0.1);
  --radius: 28px;
  --font: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #071426 0 330px, #eef4fa 330px 100%);
  font-family: var(--font);
}

.public-preview-banner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 44px;
  padding: .55rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(104,223,169,.28);
  color: #d8e8f0;
  background: linear-gradient(90deg, rgba(104,223,169,.16), rgba(18,203,232,.08)), #071426;
  font-size: .74rem;
}
.public-preview-banner strong { color: var(--lime); }
.public-preview-banner span { color: #a9bdca; }
.public-preview-banner a { color: #dffcf0; font-weight: 800; text-decoration: none; }
.public-preview-banner a:last-child { margin-left: auto; color: var(--lime); }
.public-preview-banner a:hover { text-decoration: underline; }
.preview-back { padding-right: .8rem; border-right: 1px solid rgba(255,255,255,.16); }

button, select, input, textarea { font: inherit; }
button, select, input { min-height: 44px; }
button { cursor: pointer; }

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(18, 203, 232, 0.42);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 38rem;
  height: 38rem;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.2;
}
.ambient-one { top: -26rem; left: -7rem; background: var(--cyan); }
.ambient-two { top: -25rem; right: -5rem; background: var(--purple); }

.app-header,
.studio-shell {
  position: relative;
  z-index: 1;
}

.app-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem);
  color: white;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.7rem;
  color: white;
  text-decoration: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.wordmark-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--cyan), var(--purple));
  box-shadow: 0 10px 30px rgba(18, 203, 232, 0.26);
  font-size: 1.35rem;
  font-weight: 900;
}

.wordmark > span:last-child { display: grid; }
.wordmark strong { font-size: 1rem; letter-spacing: 0.01em; }
.wordmark small { color: #91a5bc; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

.journey {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  color: #859bb3;
  font-size: 0.74rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.journey-step b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.63rem;
}

.journey-step.active {
  color: white;
  background: rgba(255,255,255,0.11);
}
.journey-step.complete { color: var(--lime); }

.provider-control {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.65rem;
  color: #8fa2b7;
  font-size: 0.72rem;
}

.provider-control select {
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  padding: 0 0.9rem;
  color: white;
  background: #10233d;
}

.product-nav { display: flex; align-items: center; gap: .25rem; justify-self: start; }
.product-nav-link {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: .45rem .72rem;
  color: #8fa2b7;
  background: transparent;
  font-size: .75rem;
  font-weight: 750;
}
.product-nav-link:hover,
.product-nav-link.active { color: white; background: rgba(255,255,255,.09); }
.product-nav-link span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: .2rem;
  place-items: center;
  border-radius: 999px;
  color: var(--night);
  background: var(--lime);
  font-size: .62rem;
}
.tour-nav-link {
  color: #dffcf0;
  border: 1px solid rgba(104, 223, 169, .22);
  background: rgba(104, 223, 169, .08);
}
.tour-nav-link > span {
  display: inline;
  min-width: 0;
  height: auto;
  margin: 0 .2rem 0 0;
  color: var(--lime);
  background: transparent;
  font-size: .72rem;
}

.site-view {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.15rem clamp(1rem, 3vw, 2.5rem) 4rem;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr);
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 36px;
  color: white;
  background:
    radial-gradient(circle at 88% 18%, rgba(134,100,247,.26), transparent 34%),
    radial-gradient(circle at 68% 70%, rgba(18,203,232,.18), transparent 37%),
    linear-gradient(145deg, #0b1a2f, #071426 64%);
  box-shadow: 0 35px 100px rgba(4,13,27,.27);
}
.dashboard-hero > div:first-child { align-self: center; padding: clamp(2rem, 6vw, 5.5rem); }
.dashboard-hero .eyebrow { color: var(--cyan); }
.dashboard-hero h1 { max-width: 780px; font-size: clamp(3rem, 6vw, 5.8rem); }
.dashboard-hero h1 em { color: #8ce9df; font-style: normal; }
.dashboard-hero > div:first-child > p:not(.eyebrow) { max-width: 700px; color: #a8bbcd; font-size: 1.05rem; line-height: 1.7; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.dashboard-secondary { border: 1px solid rgba(255,255,255,.18); color: white; background: rgba(255,255,255,.07); }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 2rem; color: #8fa6bb; font-size: .72rem; }
.trust-row span { display: grid; gap: .15rem; }
.trust-row b { color: white; font-size: .88rem; }
.dashboard-visual { position: relative; min-height: 600px; }
.dashboard-visual ai-assistant-face { position: absolute; z-index: 2; top: 110px; left: calc(50% - 110px); }
.floating-page {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 225px;
  gap: .28rem;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(18,36,61,.84);
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  backdrop-filter: blur(15px);
}
.floating-page small { color: var(--cyan); font-weight: 900; }
.floating-page strong { font-size: .88rem; }
.floating-page span { color: #9cb0c4; font-size: .68rem; line-height: 1.45; }
.page-one { top: 64px; left: 0; transform: rotate(-3deg); }
.page-two { top: 320px; right: 6%; transform: rotate(3deg); }
.page-three { top: 445px; left: 2%; transform: rotate(-2deg); }
.dashboard-section { padding: 5rem 0 2rem; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.dashboard-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.045em; }
.text-button { min-height: 38px; border: 0; color: var(--cyan-dark); background: transparent; font-weight: 800; }
.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.template-card {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.25rem;
  color: var(--ink);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-small);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.template-card:hover { transform: translateY(-4px); border-color: rgba(18,203,232,.42); box-shadow: var(--shadow); }
.template-icon { display: grid; width: 46px; height: 46px; margin-bottom: 1.25rem; place-items: center; border-radius: 15px; color: white; background: linear-gradient(145deg, var(--cyan-dark), var(--purple)); font-size: .68rem; font-weight: 900; }
.template-card strong { display: block; margin-bottom: .4rem; font-size: 1rem; }
.template-card p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.template-card small { display: block; margin-top: 1rem; color: var(--cyan-dark); font-weight: 850; }
.capability-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-top: 2rem; border: 1px solid var(--line); border-radius: 26px; background: var(--line); box-shadow: var(--shadow-small); }
.capability-band article { display: flex; gap: .9rem; padding: 1.5rem; background: rgba(255,255,255,.9); }
.capability-band article > span { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 13px; color: var(--cyan-dark); background: #e8f8fb; font-weight: 900; }
.capability-band strong { display: block; margin-bottom: .35rem; }
.capability-band p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.library-view { min-height: 720px; }
.library-hero { max-width: 1040px; margin: 2rem auto 2.5rem; text-align: center; color: white; }
.library-hero.compact { max-width: 850px; }
.library-hero h1 { max-width: none; margin-bottom: .8rem; }
.library-hero > p:not(.eyebrow) { color: #9eb1c3; font-size: 1rem; line-height: 1.6; }
.template-search { display: block; max-width: 640px; margin: 1.5rem auto 0; }
.template-search input { width: 100%; min-height: 54px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 0 1.25rem; color: white; background: rgba(255,255,255,.08); }
.template-search input::placeholder { color: #90a3b7; }
.template-library { padding: 1.5rem; border-radius: 30px; background: #eef4fa; box-shadow: var(--shadow); }
.draft-library { display: grid; max-width: 1100px; margin: 0 auto; gap: .8rem; }
.draft-card, .empty-drafts { border: 1px solid rgba(255,255,255,.8); border-radius: 22px; padding: 1.25rem; background: rgba(255,255,255,.92); box-shadow: var(--shadow-small); }
.draft-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; }
.draft-card h2 { margin: .2rem 0; font-size: 1.05rem; }
.draft-card p, .empty-drafts p { margin: 0; color: var(--muted); font-size: .74rem; }
.draft-actions { display: flex; gap: .5rem; }
.draft-delete { border: 1px solid #f2c8d0; border-radius: 10px; color: var(--danger); background: #fff6f7; }
.empty-drafts { padding: 3rem; text-align: center; }
.empty-drafts h2 { margin-bottom: .5rem; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 0 auto; gap: 1rem; }
.help-grid article { border: 1px solid var(--line); border-radius: 24px; padding: 1.5rem; background: rgba(255,255,255,.93); box-shadow: var(--shadow-small); }
.help-grid article > b { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--cyan-dark), var(--purple)); }
.help-grid h2 { margin: 1rem 0 .45rem; }
.help-grid p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.help-wide { grid-column: 1 / -1; color: white; background: linear-gradient(135deg, #10233d, #172d4d) !important; }
.help-wide > span { color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 900; }
.help-wide p { color: #a8bbcd; }
.help-tour {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1.25rem;
  background:
    radial-gradient(circle at 90% 15%, rgba(104,223,169,.2), transparent 30%),
    linear-gradient(135deg, #10233d, #172d4d) !important;
}
.help-tour > span,
.help-tour h2,
.help-tour p { grid-column: 1; }
.help-tour .button { grid-column: 2; grid-row: 1 / 4; white-space: nowrap; }
.workspace-toolbar { display: flex; align-items: center; gap: .5rem; margin: -1rem -1rem 1.3rem; padding: 0 .35rem .8rem; border-bottom: 1px solid var(--line); }
.workspace-toolbar > span { margin-left: auto; color: #7d91a5; font-size: .68rem; font-weight: 750; }

/* Public-web contrast: keep instructional copy comfortably readable. */
.template-card p,
.capability-band p,
.draft-card p,
.empty-drafts p,
.help-grid p,
.section-intro > p:last-child,
.generator-type-grid span,
.generator-panel-heading p,
.assistant-tip p {
  color: #526b7b;
}
.template-card strong,
.capability-band strong,
.generator-type-grid strong {
  color: #10243f;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1.25rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.15rem clamp(1rem, 3vw, 2.5rem) 4rem;
}

.studio-main { display: grid; gap: 1rem; min-width: 0; }
.surface,
.engine-panel,
.review-workspace,
.export-panel {
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.create-panel { padding: clamp(1.3rem, 3.5vw, 2.5rem); }
.section-intro { max-width: 760px; }
.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--cyan-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin-bottom: 0.6rem;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.section-intro > p:last-child {
  max-width: 650px;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.source-tabs {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: #edf3f8;
}

.source-tab {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 750;
}
.source-tab.active { color: var(--ink); background: white; box-shadow: var(--shadow-small); }

.source-editor { position: relative; display: block; }
.source-editor textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.2rem 1.2rem 2.7rem;
  color: var(--ink);
  background: #f9fbfd;
  font-size: 0.96rem;
  line-height: 1.62;
  transition: border 180ms ease, box-shadow 180ms ease;
}
.source-editor textarea:focus {
  border-color: rgba(18,203,232,0.6);
  box-shadow: 0 0 0 5px rgba(18,203,232,0.08);
}
.source-meter {
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  color: #8ca0b4;
  font-size: 0.7rem;
}

.drop-zone {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  border: 1.5px dashed rgba(18,203,232,0.55);
  border-radius: 22px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 20%, rgba(18,203,232,0.1), transparent 42%),
    #f9fbfd;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.drop-zone:hover,
.drop-zone.dragging {
  transform: translateY(-2px);
  border-color: var(--purple);
  background-color: #f7f5ff;
}
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { color: var(--ink); font-size: 1rem; }
.drop-zone > span:last-child { font-size: 0.75rem; }
.drop-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 22px;
  color: white;
  background: linear-gradient(145deg, var(--cyan), var(--purple));
  box-shadow: 0 14px 30px rgba(70, 141, 201, 0.25);
  font-size: 2rem;
}

.upload-list { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-size: 0.78rem;
}
.upload-item span { color: var(--muted); }
.upload-item.error { border-color: rgba(201,67,93,0.35); color: var(--danger); }
.upload-item.notice { border-color: rgba(255,154,90,0.45); background: #fff9f2; }

.detection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7fafc;
}
.field-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}
.type-picker { display: flex; align-items: center; gap: 0.65rem; }
.type-picker select {
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 2.2rem 0 0.8rem;
  color: var(--ink);
  background: white;
  font-weight: 700;
}
.detection-badge,
.validation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--muted);
  background: #e9f0f5;
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}
.detection-badge.detected { color: #066a61; background: #dff8ee; }

.auto-detect {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 190px;
}
.auto-detect input {
  width: 40px;
  height: 22px;
  min-height: 0;
  accent-color: var(--purple);
}
.auto-detect span { display: grid; }
.auto-detect strong { font-size: 0.78rem; }
.auto-detect small { color: var(--muted); font-size: 0.67rem; }

.resume-design-note,
.resume-coach,
.invoice-coach {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(18, 203, 232, 0.25);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(18, 203, 232, 0.08), rgba(134, 100, 247, 0.07));
}
.resume-design-note strong { font-size: 0.78rem; }
.resume-design-note p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.resume-note-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, var(--cyan-dark), var(--purple));
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.invoice-builder {
  margin-top: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(18, 203, 232, 0.28);
  border-radius: 20px;
  background: linear-gradient(150deg, #f8fdff, #f8f6ff);
}
.invoice-builder-head,
.invoice-items-head,
.invoice-finishing {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.invoice-builder-head h3 { margin: 0.12rem 0 0.25rem; font-size: 1.05rem; }
.invoice-builder-head p { margin: 0; color: var(--muted); font-size: 0.72rem; }
.invoice-kicker { color: var(--cyan-dark); font-size: 0.63rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.logo-picker {
  display: grid;
  width: 150px;
  min-height: 76px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(85, 54, 191, 0.35);
  border-radius: 16px;
  color: #5536bf;
  background: white;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}
.logo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.logo-picker img { width: 100%; max-height: 72px; object-fit: contain; padding: 0.4rem; }
.invoice-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.invoice-form-grid fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
}
.invoice-form-grid legend { padding: 0 0.3rem; color: var(--ink); font-size: 0.76rem; font-weight: 850; }
.invoice-builder label { display: grid; gap: 0.28rem; color: var(--muted); font-size: 0.67rem; font-weight: 700; }
.invoice-builder label span { font-weight: 500; }
.invoice-builder input,
.invoice-builder textarea,
.invoice-builder select {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: white;
}
.invoice-builder textarea { resize: vertical; }
.invoice-form-grid .wide { grid-column: 1 / -1; }
.invoice-items { margin-top: 0.9rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 16px; background: white; }
.invoice-items-head > div { display: grid; gap: 0.12rem; }
.invoice-items-head strong { font-size: 0.78rem; }
.invoice-items-head span { color: var(--muted); font-size: 0.66rem; }
.invoice-item-labels,
.invoice-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 82px 110px 110px 34px;
  gap: 0.5rem;
  align-items: center;
}
.invoice-item-labels { margin-top: 0.75rem; padding: 0 0.25rem; color: var(--muted); font-size: 0.61rem; font-weight: 800; text-transform: uppercase; }
.invoice-item-row { margin-top: 0.42rem; }
.invoice-item-row output { padding: 0.55rem 0.3rem; color: var(--ink); font-size: 0.72rem; font-weight: 800; text-align: right; }
.invoice-item-remove { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; color: #a22c47; background: #ffe8ee; font-weight: 900; }
.invoice-finishing { margin-top: 0.9rem; align-items: stretch; }
.invoice-adjustments { display: grid; grid-template-columns: repeat(4, minmax(105px, 1fr)); gap: 0.55rem; flex: 1 1 auto; }
.invoice-live-totals { display: grid; width: 220px; flex: 0 0 auto; gap: 0.4rem; padding: 0.75rem; border-radius: 14px; color: var(--muted); background: var(--night-soft); }
.invoice-live-totals span,
.invoice-live-totals strong { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.69rem; }
.invoice-live-totals b { color: white; }
.invoice-live-totals strong { padding-top: 0.45rem; border-top: 1px solid rgba(255,255,255,0.16); color: #78f0ce; font-size: 0.78rem; }
.invoice-payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.9rem; }
.invoice-compliance-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.63rem; line-height: 1.45; }
.invoice-coach { border-color: rgba(104,223,169,0.38); background: linear-gradient(135deg, rgba(104,223,169,0.1), rgba(18,203,232,0.07)); }
.invoice-coach > div,
.resume-coach > div { display: flex; align-items: center; gap: 0.7rem; min-width: 220px; }
.invoice-coach > div > span:last-child,
.resume-coach > div > span:last-child { display: grid; gap: 0.15rem; }
.invoice-coach small,
.resume-coach small { color: var(--muted); font-size: 0.66rem; }
.invoice-coach ul,
.resume-coach ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.invoice-coach-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--night);
  background: linear-gradient(145deg, #70f0bb, #5fe8f6);
  font-size: 1rem;
  font-weight: 900;
}

.thank-you-builder {
  margin-top: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(238, 107, 195, 0.26);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffafd, #f8f6ff 62%, #f2fcff);
}
.thank-you-builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.thank-you-builder-head h3 { margin: 0.12rem 0 0.25rem; font-size: 1.05rem; }
.thank-you-builder-head p { margin: 0; color: var(--muted); font-size: 0.72rem; }
.thank-you-kicker { color: #b9328d; font-size: 0.63rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.thank-you-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--purple));
  box-shadow: 0 12px 26px rgba(185,50,141,0.2);
  font-size: 1.2rem;
}
.thank-you-routing { display: grid; grid-template-columns: 1.35fr 1fr 1fr 0.85fr; gap: 0.65rem; margin-top: 1rem; }
.thank-you-builder label { display: grid; gap: 0.28rem; color: var(--muted); font-size: 0.67rem; font-weight: 700; }
.thank-you-builder label span { font-weight: 500; }
.thank-you-builder input,
.thank-you-builder textarea,
.thank-you-builder select {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: white;
}
.thank-you-builder textarea { resize: vertical; }
.thank-you-guidance {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  color: #4d3368;
  background: rgba(238,107,195,0.09);
}
.thank-you-guidance-icon { color: var(--pink); }
.thank-you-guidance div { display: grid; gap: 0.12rem; }
.thank-you-guidance strong { font-size: 0.72rem; }
.thank-you-guidance p { margin: 0; color: var(--muted); font-size: 0.66rem; line-height: 1.45; }
.thank-you-people-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.8rem; margin-top: 0.8rem; }
.thank-you-people-grid fieldset {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.84);
}
.thank-you-people-grid legend { padding: 0 0.3rem; color: var(--ink); font-size: 0.76rem; font-weight: 850; }
.thank-you-people-grid .wide { grid-column: 1 / -1; }
.thank-you-content-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.65rem; margin-top: 0.8rem; }
.thank-you-check {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 39px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.thank-you-check input { width: 18px; min-height: 18px; accent-color: var(--pink); }
.thank-you-coach {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(238,107,195,0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(238,107,195,0.08), rgba(134,100,247,0.07));
}
.thank-you-coach > div { display: flex; align-items: center; gap: 0.7rem; min-width: 220px; }
.thank-you-coach > div > span:last-child { display: grid; gap: 0.15rem; }
.thank-you-coach small { color: var(--muted); font-size: 0.66rem; }
.thank-you-coach ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.thank-you-coach-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, var(--pink), var(--purple));
  font-size: 0.88rem;
  font-weight: 900;
}

.details-drawer {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.details-drawer summary {
  padding: 0.9rem 1rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}
.details-drawer summary::-webkit-details-marker { display: none; }
.details-drawer summary::before { content: "＋"; margin-right: 0.5rem; color: var(--purple); }
.details-drawer[open] summary::before { content: "−"; }
.details-drawer summary span { float: right; color: var(--muted); font-size: 0.68rem; font-weight: 500; }
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}
.details-grid label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.74rem; }
.details-grid input,
.details-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: #f8fafc;
}
.full-width { grid-column: 1 / -1; }

.create-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.create-action > div { display: grid; gap: 0.18rem; min-width: 0; }
.create-action > div strong { font-size: 0.86rem; }
.create-action > div span { overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }

.button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 1rem;
  color: var(--ink);
  background: white;
  font-weight: 800;
}
.button.primary {
  border-color: transparent;
  color: var(--night);
  background: linear-gradient(135deg, #5fe8f6, #70f0bb);
  box-shadow: 0 14px 30px rgba(18, 203, 232, 0.22);
}
.button.primary:hover { transform: translateY(-2px); }
.button.large {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 54px;
  padding: 0.8rem 1.15rem 0.8rem 1.3rem;
}
.button.large b {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 10px;
  background: rgba(7,20,38,0.1);
}
.button.secondary { color: white; background: var(--night-soft); }
.button.quiet { color: var(--cyan-dark); background: #e8f8fb; }
.button:disabled,
.export-button:disabled { cursor: not-allowed; opacity: 0.48; transform: none; }

.engine-panel { padding: 1.1rem 1.3rem; }
.engine-heading,
.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.engine-heading h2,
.review-head h2,
.export-panel h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.engine-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.engine-stages article {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  min-height: 70px;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fafc;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.engine-stages article b { grid-row: 1 / 3; color: #afbdca; font-size: 0.65rem; }
.engine-stages article strong { font-size: 0.76rem; }
.engine-stages article span,
.engine-stages article small { color: var(--muted); font-size: 0.64rem; line-height: 1.25; }
.engine-stages article.stage-active {
  transform: translateY(-3px);
  border-color: rgba(134,100,247,0.55);
  color: #5536bf;
  background: #f1edff;
  box-shadow: 0 10px 22px rgba(85,54,191,0.11);
}
.engine-stages article.stage-complete { border-color: rgba(104,223,169,0.55); background: #effbf6; }
.engine-stages article.stage-error { border-color: rgba(201,67,93,0.38); background: #fff2f5; }
.engine-summary { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.73rem; }
.validation-badge.valid { color: #09644d; background: #dcf7eb; }
.validation-badge.invalid { color: #9e2942; background: #ffe4ea; }

.review-workspace { padding: clamp(1.1rem, 3vw, 1.7rem); }
.review-actions { display: flex; gap: 0.55rem; }
.review-guidance { margin: 0.45rem 0 1rem; color: var(--muted); font-size: 0.78rem; }
.identified-type-summary {
  margin: 0 0 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid #9ddfd5;
  border-radius: 12px;
  background: #e9fbf6;
  color: #174b47;
  font-size: 0.78rem;
  font-weight: 700;
}
.resume-coach {
  align-items: stretch;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.resume-coach > div { display: flex; align-items: center; gap: 0.65rem; min-width: 190px; }
.resume-coach > div > span:last-child { display: grid; }
.resume-coach strong { font-size: 0.76rem; }
.resume-coach small { margin-top: 0.15rem; color: var(--muted); font-size: 0.65rem; }
.resume-coach ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.68rem; line-height: 1.45; }
.resume-coach.strong { border-color: rgba(104, 223, 169, 0.5); background: #effbf6; }
.document-workbench {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
}

.page-organizer {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f5f8fb;
}
.organizer-title {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0.3rem 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.organizer-title b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 8px;
  color: var(--cyan-dark);
  background: #dff6fa;
}
.page-organizer ol { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.page-nav {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  width: 100%;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.55rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.page-nav:hover,
.page-nav.active { border-color: var(--line); background: white; box-shadow: var(--shadow-small); }
.page-nav b {
  display: grid;
  width: 27px;
  height: 34px;
  place-items: center;
  border: 1px solid #dbe5ed;
  border-radius: 7px;
  color: var(--purple);
  background: #f8fafc;
  font-size: 0.65rem;
}
.page-nav span { align-self: center; overflow: hidden; font-size: 0.7rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.page-canvas { display: grid; gap: 0.8rem; }
.page-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-small);
  overflow: hidden;
  animation: pageIn 320ms ease both;
}
.page-card.dragging { opacity: 0.52; }
.page-card.drag-target { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(134,100,247,0.1); }
.page-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.drag-handle {
  border: 0;
  color: #9aaabd;
  background: transparent;
  font-size: 1rem;
  cursor: grab;
}
.page-title { min-width: 0; }
.page-title input {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.25rem 0.4rem;
  color: var(--ink);
  background: transparent;
  font-weight: 850;
}
.page-title input:focus { border-color: var(--line); background: white; }
.page-title small { display: block; padding-left: 0.4rem; color: var(--muted); font-size: 0.63rem; }
.page-controls { display: flex; gap: 0.28rem; }
.page-controls button {
  display: grid;
  width: 32px;
  min-height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: white;
}
.page-controls button:hover { color: var(--purple); border-color: rgba(134,100,247,0.35); }
.page-body { padding: 0.85rem; }
.page-body textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 0;
  padding: 0.2rem;
  color: var(--ink);
  background: white;
  line-height: 1.65;
}
.page-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.68rem;
}
.page-footer .page-check { min-height: 34px; padding: 0.35rem 0.65rem; border-radius: 10px; font-size: 0.68rem; }
.page-feedback.ok { color: #08715a; }
.page-feedback.needs-work { color: var(--danger); }
.page-card.verified { border-color: rgba(104,223,169,0.6); }
.page-card.verified .page-bar { background: #f0fbf6; }

.raw-draft { margin-top: 0.8rem; color: var(--muted); font-size: 0.74rem; }
.raw-draft summary { cursor: pointer; }
.raw-draft pre { max-height: 400px; overflow: auto; border-radius: 14px; padding: 0.8rem; color: var(--ink); background: #edf2f7; white-space: pre-wrap; }

.review-complete {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f6f9fc;
}
.review-summary { display: flex; align-items: center; gap: 0.7rem; }
.review-summary > span:last-child { display: grid; }
.review-complete small { color: var(--muted); font-size: 0.68rem; }
.review-approval { display: grid; justify-items: end; gap: 0.55rem; }
.review-complete label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.73rem; font-weight: 750; cursor: pointer; }
.review-complete input { width: 18px; min-height: 18px; accent-color: var(--purple); }
.review-unlock { min-height: 42px; }
.review-state-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #8ca0b4;
  background: #e8eef4;
  cursor: pointer;
}
.review-state-icon:hover, .review-state-icon:focus-visible { color: var(--purple); outline: 2px solid rgba(134,100,247,0.35); outline-offset: 2px; }
.review-state-icon:disabled { cursor: wait; opacity: 0.65; }
.review-complete.ready { border-color: rgba(104,223,169,0.55); background: #effbf6; }
.review-complete.ready .review-state-icon { color: #075c49; background: var(--lime); }

.export-panel {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 0.85fr);
  gap: 1.2rem;
  padding: 1.5rem;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 12% 130%, rgba(18,203,232,0.3), transparent 45%),
    radial-gradient(circle at 85% -20%, rgba(134,100,247,0.35), transparent 48%),
    var(--night);
}
.export-panel p:not(.eyebrow) { max-width: 540px; margin: 0.45rem 0 0; color: #9db0c5; font-size: 0.8rem; line-height: 1.5; }
.export-panel .eyebrow { color: var(--cyan); }
.export-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.export-button {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 0.75rem;
  color: white;
  background: rgba(255,255,255,0.07);
  text-align: left;
}
.export-button:hover { transform: translateY(-2px); border-color: rgba(95,232,246,0.55); background: rgba(255,255,255,0.11); }
.export-button > span:last-child { display: grid; }
.export-button strong { font-size: 0.75rem; }
.export-button small { margin-top: 0.14rem; color: #93a8be; font-size: 0.62rem; }
.format-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  font-size: 0.7rem;
  font-weight: 900;
}
.format-icon.pdf { background: linear-gradient(145deg, #ff6d8d, #d53655); }
.format-icon.word { background: linear-gradient(145deg, #4598ff, #2455c5); font-size: 1rem; }
.status { grid-column: 1 / -1; color: #93a8be; font-size: 0.7rem; }

.assistant-rail {
  position: sticky;
  top: 1rem;
  align-self: start;
  display: grid;
  place-items: center;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 1.35rem 1rem;
  color: white;
  background:
    radial-gradient(circle at 50% 24%, rgba(18,203,232,0.16), transparent 37%),
    linear-gradient(180deg, #10233d, #071426);
  box-shadow: 0 24px 70px rgba(4,13,27,0.24);
}
.assistant-glow {
  position: absolute;
  top: 4.1rem;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(18,203,232,0.23);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(18,203,232,0.22), inset 0 0 55px rgba(134,100,247,0.12);
}
.assistant-rail ai-assistant-face { position: relative; z-index: 1; }
.speech-card {
  position: relative;
  width: 100%;
  margin-top: -0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
}
.speech-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border-left: 1px solid rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #172a44;
  transform: rotate(45deg);
}
.speech-card p { margin-bottom: 0.35rem; color: var(--cyan); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.speech-card strong { display: block; font-size: 1rem; line-height: 1.2; }
.speech-card span { display: block; margin-top: 0.4rem; color: #9db0c5; font-size: 0.72rem; line-height: 1.5; }
.assistant-tip {
  display: flex;
  gap: 0.6rem;
  align-self: end;
  margin-top: 1rem;
  color: #8298af;
}
.assistant-tip > span { color: var(--purple); }
.assistant-tip p { margin: 0; font-size: 0.64rem; line-height: 1.45; }
.assistant-tip strong { color: #b6c4d2; }

.review-dialog {
  width: min(700px, calc(100% - 2rem));
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 28px;
  padding: 1.2rem 1.5rem 1.2rem 0.8rem;
  color: var(--ink);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 35px 100px rgba(7,20,38,0.35);
}
.review-dialog[open] { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 0.8rem; animation: dialogIn 240ms ease both; }
.review-dialog::backdrop { background: rgba(4,13,27,0.66); backdrop-filter: blur(8px); }
.review-dialog h2 { margin-bottom: 0.5rem; font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -0.04em; line-height: 1.05; }
.review-dialog p:not(.eyebrow) { color: var(--muted); font-size: 0.84rem; line-height: 1.6; }

.privacy-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid rgba(95, 232, 246, .28);
  border-radius: 30px;
  padding: 0;
  color: white;
  background:
    radial-gradient(circle at 96% 2%, rgba(134, 100, 247, .3), transparent 34%),
    radial-gradient(circle at 4% 100%, rgba(18, 203, 232, .16), transparent 32%),
    linear-gradient(145deg, #10243e, #071426 72%);
  box-shadow: 0 35px 120px rgba(0, 0, 0, .55);
}
.privacy-dialog[open] {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.35rem;
  animation: dialogIn 240ms ease both;
}
.privacy-dialog::backdrop {
  background: rgba(3, 11, 23, .82);
  backdrop-filter: blur(11px);
}
.privacy-mark {
  display: grid;
  align-content: start;
  justify-content: center;
  padding: 2rem 0 0 1.5rem;
}
.privacy-mark > span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(104, 223, 169, .45);
  border-radius: 25px;
  color: var(--lime);
  background: linear-gradient(145deg, rgba(104,223,169,.18), rgba(18,203,232,.08));
  box-shadow: 0 0 0 9px rgba(104,223,169,.06), 0 18px 50px rgba(0,0,0,.25);
  font-size: 1.55rem;
  transform: rotate(45deg);
}
.privacy-mark > span::first-letter { transform: rotate(-45deg); }
.privacy-copy { padding: 2rem 2rem 2rem 0; }
.privacy-kicker {
  margin: 0 0 .55rem;
  color: var(--lime);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.privacy-dialog h2 {
  margin: 0 0 .65rem;
  color: white;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -.05em;
  line-height: 1;
}
.privacy-dialog #privacyNoticeDetail {
  max-width: 590px;
  margin: 0;
  color: #b5c9d8;
  font-size: .88rem;
  line-height: 1.65;
}
.privacy-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin: 1.35rem 0 .85rem;
}
.privacy-points > div {
  display: flex;
  gap: .72rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 17px;
  padding: .9rem;
  background: rgba(255,255,255,.055);
}
.privacy-points b {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--night);
  background: var(--cyan);
  font-weight: 950;
}
.privacy-points span { display: grid; gap: .22rem; }
.privacy-points strong { font-size: .76rem; }
.privacy-points small { color: #9fb4c5; font-size: .68rem; line-height: 1.48; }
.privacy-warning {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  border: 1px solid rgba(255, 154, 90, .42);
  border-radius: 17px;
  padding: .92rem 1rem;
  color: #ffe3d0;
  background: rgba(255, 154, 90, .1);
}
.privacy-warning > span { color: var(--orange); font-size: 1rem; }
.privacy-warning p { margin: 0; font-size: .75rem; line-height: 1.55; }
.privacy-warning strong { color: white; }
.privacy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1.3rem;
}
.privacy-actions .button { min-height: 48px; text-decoration: none; }
.privacy-leave {
  border: 1px solid rgba(255,255,255,.14);
  color: #b9cad7;
  background: rgba(255,255,255,.055);
}
.privacy-leave:hover { color: white; background: rgba(255,255,255,.1); }

.product-tour {
  position: fixed;
  z-index: 80;
  inset: 0;
  pointer-events: none;
}
.tour-spotlight {
  position: fixed;
  z-index: 81;
  border: 3px solid var(--lime);
  border-radius: 16px;
  box-shadow:
    0 0 0 9999px rgba(3, 12, 25, .72),
    0 0 0 8px rgba(104, 223, 169, .16),
    0 0 34px rgba(104, 223, 169, .7);
  transition: left 220ms ease, top 220ms ease, width 220ms ease, height 220ms ease;
  animation: tourPulse 1.8s ease-in-out infinite;
}
.tour-spotlight::after {
  position: absolute;
  right: -11px;
  bottom: -11px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: var(--night);
  background: var(--lime);
  box-shadow: 0 8px 24px rgba(4, 13, 27, .35);
  content: "✓";
  font-weight: 950;
}
.tour-card {
  position: fixed;
  z-index: 82;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  padding: 1.4rem;
  color: white;
  background:
    radial-gradient(circle at 94% 5%, rgba(134, 100, 247, .28), transparent 36%),
    linear-gradient(145deg, #122641, #071426);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
  transition: left 220ms ease, top 220ms ease;
}
.tour-card::before {
  position: absolute;
  width: 18px;
  height: 18px;
  border-left: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  background: #10223c;
  content: "";
  transform: rotate(45deg);
}
.tour-card[data-placement="right"]::before { top: 42px; left: -10px; }
.tour-card[data-placement="left"]::before { top: 42px; right: -10px; transform: rotate(225deg); }
.tour-card[data-placement="bottom"]::before { top: -10px; left: 42px; transform: rotate(135deg); }
.tour-card[data-placement="top"]::before { bottom: -10px; left: 42px; transform: rotate(-45deg); }
.tour-step-label {
  display: flex;
  align-items: center;
  gap: .42rem;
  padding-right: 2rem;
  color: var(--lime);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tour-step-label > span { font-size: 1rem; }
.tour-card h2 {
  margin: .72rem 0 .4rem;
  color: white;
  font-size: 1.55rem;
  letter-spacing: -.035em;
}
.tour-card > p {
  margin: 0;
  color: #b7cad8;
  font-size: .82rem;
  line-height: 1.62;
}
.tour-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: grid;
  width: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: #cbd9e3;
  background: rgba(255,255,255,.06);
  font-size: 1.2rem;
}
.tour-close:hover { color: white; background: rgba(255,255,255,.12); }
.tour-progress { display: flex; gap: .38rem; margin: 1.2rem 0; }
.tour-progress span {
  width: 9px;
  height: 9px;
  border: 1px solid #60758a;
  border-radius: 999px;
  background: transparent;
  transition: width 180ms ease, background 180ms ease;
}
.tour-progress span.active { width: 28px; border-color: var(--cyan); background: var(--cyan); }
.tour-progress span.complete { border-color: var(--lime); background: var(--lime); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.tour-actions > div { display: flex; gap: .45rem; }
.tour-actions .button { min-height: 42px; }
.tour-skip {
  min-height: 42px;
  border: 0;
  padding: 0;
  color: #a9bdca;
  background: transparent;
  font-size: .74rem;
  font-weight: 800;
}
.tour-skip:hover { color: white; text-decoration: underline; }
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(3,12,25,.72), 0 0 0 8px rgba(104,223,169,.12), 0 0 24px rgba(104,223,169,.48); }
  50% { box-shadow: 0 0 0 9999px rgba(3,12,25,.72), 0 0 0 13px rgba(104,223,169,.22), 0 0 42px rgba(104,223,169,.78); }
}
.dialog-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #edf2f6;
  font-size: 1.2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.proposal-builder {
  margin: 1.1rem 0;
  padding: 1.45rem;
  border: 1px solid #cce5e8;
  border-radius: 22px;
  background: linear-gradient(145deg, #f7fcfd 0%, #fff 48%, #f4f1ff 100%);
  box-shadow: 0 18px 44px rgba(20, 33, 61, 0.08);
}
.proposal-builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.proposal-builder-head > div:first-child { display: grid; gap: .3rem; }
.proposal-builder h3 { margin: 0; color: var(--navy); font-size: 1.22rem; }
.proposal-builder p { margin: 0; color: var(--muted); }
.proposal-kicker { color: #137d91; font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.proposal-mark, .proposal-coach-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 14px; color: #fff; font-size: 1.2rem; font-weight: 900;
  background: linear-gradient(135deg, #18afc4, #7a6af5);
}
.proposal-routing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.proposal-builder label { display: grid; gap: .35rem; color: #263a52; font-size: .76rem; font-weight: 750; }
.proposal-builder label span { color: #7d8da0; font-size: .64rem; font-weight: 600; }
.proposal-builder input, .proposal-builder select, .proposal-builder textarea {
  width: 100%; border: 1px solid #d6e3e8; border-radius: 11px; background: #fff;
  color: #17243a; padding: .65rem .7rem; font: inherit; font-weight: 500; resize: vertical;
}
.proposal-builder input:focus, .proposal-builder select:focus, .proposal-builder textarea:focus {
  outline: 3px solid rgba(24, 175, 196, .16); border-color: #18afc4;
}
.proposal-guidance {
  display: flex; gap: .7rem; align-items: flex-start; margin: .85rem 0 1.05rem; padding: .8rem .9rem;
  border-radius: 14px; color: #244156; background: #e9f8fa;
}
.proposal-guidance > span { color: #11899c; font-weight: 900; }
.proposal-guidance strong { display: block; margin-bottom: .1rem; }
.proposal-guidance p { font-size: .75rem; }
.proposal-parties { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .9rem; }
.proposal-parties fieldset {
  display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 0; padding: .85rem;
  border: 1px solid #dce8ed; border-radius: 15px; background: rgba(255,255,255,.72);
}
.proposal-parties legend { padding: 0 .4rem; color: var(--navy); font-size: .72rem; font-weight: 850; }
.proposal-parties .wide, .proposal-wide { grid-column: 1 / -1; }
.proposal-content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.proposal-compliance-note { margin-top: 1rem !important; padding-top: .8rem; border-top: 1px solid #d9e8eb; font-size: .7rem; }
.proposal-coach {
  margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid #bfe4e8; border-radius: 16px;
  background: linear-gradient(110deg, #effbfc, #f7f4ff);
}
.proposal-coach > div { display: flex; align-items: center; gap: .7rem; }
.proposal-coach strong, .proposal-coach small { display: block; }
.proposal-coach small { margin-top: .1rem; color: var(--muted); font-size: .68rem; }
.proposal-coach ul { margin: .6rem 0 0 3.4rem; padding-left: 1rem; color: var(--muted); font-size: .7rem; line-height: 1.45; }

@media (max-width: 1080px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .journey { display: none; }
  .provider-control { grid-column: 3; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-visual { min-height: 470px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-shell { grid-template-columns: 1fr; }
  .assistant-rail {
    position: relative;
    top: auto;
    grid-template-columns: 150px 1fr;
    min-height: 0;
    order: -1;
    padding: 0.75rem 1rem;
  }
  .assistant-rail ai-assistant-face { grid-row: 1 / 3; width: 140px !important; height: 140px !important; }
  .assistant-glow { top: 0; left: 0.3rem; width: 145px; height: 145px; }
  .speech-card { margin: 0; }
  .speech-card::before { top: 50%; left: -9px; }
  .assistant-tip { margin: 0.6rem 0 0; }
}

@media (max-width: 760px) {
  .public-preview-banner { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .public-preview-banner a:last-child { margin-left: 0; }
  .preview-back { padding-right: 0; border-right: 0; }
  body { background: linear-gradient(180deg, #071426 0 390px, #eef4fa 390px 100%); }
  .app-header { grid-template-columns: 1fr; gap: 0.8rem; }
  .product-nav { width: 100%; overflow-x: auto; }
  .product-nav-link { white-space: nowrap; }
  .provider-control { justify-self: start; }
  .dashboard-hero { border-radius: 26px; }
  .dashboard-hero > div:first-child { padding: 2rem 1.3rem; }
  .dashboard-hero h1 { font-size: 3rem; }
  .dashboard-visual { min-height: 520px; }
  .floating-page { width: 190px; }
  .page-one { top: 40px; }
  .page-two { top: 280px; right: 0; }
  .page-three { top: 400px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .template-grid, .capability-band, .help-grid { grid-template-columns: 1fr; }
  .help-wide { grid-column: auto; }
  .help-tour { display: block; }
  .help-tour .button { margin-top: 1rem; width: 100%; }
  .draft-card { grid-template-columns: 1fr; }
  .draft-actions { width: 100%; }
  .draft-actions .button, .draft-actions button { flex: 1; }
  .studio-shell { padding-top: 0.5rem; }
  .assistant-rail { grid-template-columns: 110px 1fr; }
  .assistant-rail ai-assistant-face { width: 105px !important; height: 105px !important; }
  .assistant-glow { width: 105px; height: 105px; }
  .assistant-tip { display: none; }
  h1 { font-size: 2.55rem; }
  .detection-row { grid-template-columns: 1fr; align-items: start; }
  .type-picker { align-items: flex-start; flex-direction: column; }
  .type-picker select { width: 100%; }
  .details-grid { grid-template-columns: 1fr; }
  .invoice-builder-head,
  .invoice-finishing { flex-direction: column; }
  .logo-picker,
  .invoice-live-totals { width: 100%; }
  .invoice-form-grid,
  .invoice-payment-grid { grid-template-columns: 1fr; }
  .thank-you-builder-head { align-items: center; }
  .thank-you-routing,
  .thank-you-people-grid,
  .thank-you-content-grid { grid-template-columns: 1fr; }
  .proposal-routing,
  .proposal-parties,
  .proposal-content-grid,
  .proposal-parties fieldset { grid-template-columns: 1fr; }
  .proposal-parties .wide, .proposal-wide { grid-column: auto; }
  .invoice-adjustments { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .invoice-item-labels { display: none; }
  .invoice-item-row { grid-template-columns: minmax(0, 1fr) 70px 90px 34px; }
  .invoice-item-row output { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .full-width { grid-column: auto; }
  .create-action { align-items: stretch; flex-direction: column; }
  .create-action .button { justify-content: space-between; width: 100%; }
  .engine-stages { grid-template-columns: 1fr; }
  .engine-stages article { min-height: 54px; }
  .review-head { align-items: flex-start; flex-direction: column; }
  .review-actions { width: 100%; }
  .review-actions .button { flex: 1; }
  .document-workbench { grid-template-columns: 1fr; }
  .page-organizer { position: static; max-height: none; }
  .page-organizer ol { display: flex; overflow-x: auto; padding-bottom: 0.25rem; }
  .page-organizer li { flex: 0 0 150px; }
  .review-complete { grid-template-columns: 1fr; }
  .review-approval { justify-items: stretch; }
  .approval-check { justify-content: center; }
  .export-panel { grid-template-columns: 1fr; }
  .export-buttons { grid-template-columns: 1fr; }
  .review-dialog[open] { grid-template-columns: 1fr; padding: 1rem; text-align: center; }
  .review-dialog ai-assistant-face { width: 110px !important; height: 110px !important; margin: 0 auto -1rem; }
  .tour-card { border-radius: 20px; padding: 1.15rem; }
  .tour-card::before { display: none; }
  .tour-actions { align-items: stretch; flex-direction: column-reverse; }
  .tour-actions > div { width: 100%; }
  .tour-actions .button { flex: 1; }
  .tour-skip { align-self: center; }
  .privacy-dialog[open] { grid-template-columns: 1fr; gap: .5rem; }
  .privacy-mark { justify-content: start; padding: 1.25rem 1.25rem 0; }
  .privacy-mark > span { width: 54px; height: 54px; border-radius: 18px; font-size: 1.1rem; }
  .privacy-copy { padding: .6rem 1.25rem 1.25rem; }
  .privacy-points { grid-template-columns: 1fr; }
  .privacy-actions { align-items: stretch; flex-direction: column-reverse; }
  .privacy-actions .button { justify-content: center; width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
