:root {
  --ic-ink: #1A2B44;
  --ic-ink-soft: #3B4B63;
  --ic-paper: #F2EFE6;
  --ic-paper-raised: #FBFAF6;
  --ic-stamp: #B23B3B;
  --ic-stamp-dark: #8E2E2E;
  --ic-sage: #5C7A6B;
  --ic-gold: #C99A3D;
  --ic-line: rgba(26, 43, 68, 0.14);
  --ic-danger: #A6432E;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ic-ink);
  background: var(--ic-paper);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--ic-ink); }
a { color: var(--ic-stamp); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 18px; height: 18px; display: block; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
  padding: 13px 24px;
  background: linear-gradient(135deg, #102038 0%, #172942 100%);
  color: var(--ic-paper);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 26px rgba(9, 19, 34, 0.18);
}
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; order: 1; color: var(--ic-paper); text-decoration: none; }
.brand-mark { display: block; flex: 0 0 auto; }
.topbar .brand-mark { width: 34px; height: 34px; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -0.025em; white-space: nowrap; }
.brand-word em { font-style: normal; font-weight: 600; color: #F4B2B2; }
.topbar-actions { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 10px; order: 2; }
.page-nav { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.nav-link { color: rgba(242,239,230,0.9); }
.tb-select { min-width: 170px; }
.save-status { min-width: 120px; text-align: center; }

@media (max-width: 1500px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 16px; }
  .brand { grid-column: 1; grid-row: 1; }
  .topbar-actions { grid-column: 1; grid-row: 2; flex-wrap: wrap; justify-content: flex-start; }
}
@media (max-width: 620px) {
  .topbar { padding: 12px 14px; gap: 10px; }
  .brand-word { font-size: 19px; }
  .brand svg { width: 26px; height: 26px; }
  .topbar .brand-mark { width: 30px; height: 30px; }
  .page-nav { width: 100%; }
  .topbar-actions { gap: 8px; }
  .tb-select { flex: 1 1 190px; min-width: 0; }
  .save-status { min-width: 96px; }
}
.tb-btn { min-height: 38px; background: rgba(255,255,255,0.015); border: 1px solid rgba(242,239,230,0.16); color: var(--ic-paper); padding: 8px 12px; border-radius: 9px; font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.025em; line-height: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background 160ms ease, border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease; }
.tb-btn .ui-icon { width: 16px; height: 16px; flex-basis: 16px; }
.tb-btn .chevron { width: 13px; height: 13px; flex-basis: 13px; margin-left: 1px; opacity: 0.75; }
.tb-btn:hover { background: rgba(242,239,230,0.09); border-color: rgba(242,239,230,0.24); transform: translateY(-1px); }
.tb-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid rgba(244,178,178,0.95); outline-offset: 2px; }
#btn-export { background: linear-gradient(180deg, #BC4141 0%, #A93232 100%); border-color: rgba(255,255,255,0.12); box-shadow: 0 7px 18px rgba(178,59,59,0.24); }
#btn-export:hover { background: linear-gradient(180deg, #C94949 0%, #AD3535 100%); border-color: rgba(255,255,255,0.2); }
.tb-btn.primary { background: linear-gradient(180deg,var(--ic-stamp) 0%, var(--ic-stamp-dark) 100%); border-color: rgba(0,0,0,0.06); box-shadow: 0 6px 18px rgba(26,43,68,0.12); }
.tb-btn.primary:hover { filter: brightness(0.98); transform: translateY(-1px); }
.tb-select { height: 38px; background: rgba(242,239,230,0.055); border: 1px solid rgba(242,239,230,0.14); color: var(--ic-paper); padding: 7px 11px; border-radius: 9px; font-size: 13px; font-family: var(--font-mono); }
.tb-select option { color: var(--ic-ink); }
.warning-banner { background: #F2D9CE; color: var(--ic-danger); padding: 10px 20px; font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--ic-line); }
.warning-banner button { background: none; border: 1px solid var(--ic-danger); color: var(--ic-danger); border-radius: 3px; padding: 3px 9px; font-size: 11px; }
.workspace { flex: 0 0 auto; display: grid; grid-template-columns: 420px minmax(0, 1fr); align-items: stretch; height: clamp(720px, calc(100dvh - 66px), 920px); min-height: 0; }
.editor-pane { height: 100%; min-height: 0; overflow-y: auto; background: var(--ic-paper-raised); border-right: 1px solid var(--ic-line); padding: 20px; }
.preview-pane { height: 100%; min-height: 0; overflow-y: auto; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; background: radial-gradient(circle at 1px 1px, rgba(26,43,68,0.05) 1px, transparent 0); background-size: 20px 20px; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; height: auto; max-height: none; }
  .editor-pane, .preview-pane { height: auto; overflow: visible; }
  .editor-pane { border-right: 0; border-bottom: 1px solid var(--ic-line); }
}
.preview-controls { display: flex; gap: 4px; align-items: center; padding: 4px; border: 1px solid rgba(26,43,68,0.09); border-radius: 10px; background: rgba(251,250,246,0.82); box-shadow: 0 5px 16px rgba(26,43,68,0.06); }
.preview-top { display: flex; align-items: center; justify-content: space-between; width: 720px; max-width: 100%; margin-bottom: 12px; }
.save-icon { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.save-icon.ok { background: #3CB371; box-shadow: 0 6px 14px rgba(60,179,113,0.12); }
.save-icon.warn { background: #E1A23B; box-shadow: 0 6px 14px rgba(225,162,59,0.12); }
.preview-actions { display: none; }
.quick-actions { display: inline-flex; gap: 5px; align-items: center; margin-left: 8px; padding: 4px; border: 1px solid rgba(26,43,68,0.08); border-radius: 10px; background: rgba(251,250,246,0.78); }
.icon-btn { background: transparent; border: 0; width: 32px; height: 32px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; padding: 6px; color: var(--ic-ink-soft); transition: color 140ms ease, background 140ms ease, transform 120ms ease; }
.icon-btn .ui-icon { width: 17px; height: 17px; flex-basis: 17px; }
.icon-btn:hover { color: var(--ic-ink); background: rgba(26,43,68,0.07); transform: translateY(-1px); }
.hero-strip { background: #fff; border: 1px solid var(--ic-line); border-radius: 18px; padding: 32px 34px; margin: 20px auto 16px; box-shadow: 0 24px 56px rgba(26,43,68,0.12); max-width: 1120px; }
.hero-strip.collapsed { width: 100%; max-width: none; margin: 0; padding: 0 24px; border-width: 1px 0; border-radius: 0; background: #F8F6F0; box-shadow: 0 8px 22px rgba(26,43,68,0.07); }
.hero-strip.collapsed > :not(.hero-repeat-summary) { display: none; }
.hero-repeat-summary { display: none; }
.hero-strip.collapsed .hero-repeat-summary { width: min(1120px, 100%); min-height: 52px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; color: var(--ic-ink-soft); font-size: 11.5px; }
.hero-promise-badge { padding: 6px 9px; border: 1px solid rgba(26,43,68,0.1); border-radius: 6px; background: var(--ic-paper-raised); box-shadow: 0 3px 10px rgba(26,43,68,0.08); color: var(--ic-ink); font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.075em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.hero-promise-signup { color: var(--ic-stamp-dark); }
.hero-repeat-center { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 18px; }
.hero-repeat-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.hero-repeat-expand { padding: 0; display: inline-flex; align-items: center; gap: 18px; border: 0; background: transparent; color: inherit; }
.hero-repeat-expand:hover .hero-repeat-feature, .hero-repeat-expand:focus-visible .hero-repeat-feature { color: var(--ic-stamp-dark); }
.hero-repeat-expand:focus-visible { outline: 2px solid rgba(178,59,59,0.35); outline-offset: 4px; border-radius: 4px; }
.hero-repeat-feature { display: inline-flex; align-items: center; gap: 7px; color: var(--ic-ink); white-space: nowrap; }
.hero-repeat-feature .ui-icon { width: 17px; height: 17px; flex-basis: 17px; color: var(--ic-stamp); }
.hero-repeat-feature strong { font-size: 11.5px; }
.hero-repeat-detail { min-width: 0; }
.hero-repeat-right > a { display: inline-flex; align-items: center; gap: 6px; color: var(--ic-stamp-dark); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero-repeat-right > a:hover { text-decoration: underline; }
.hero-expanded-content { position: relative; }
.hero-intro-copy { min-height: 302px; padding-right: 224px; }
.hero-close { position: absolute; z-index: 4; top: -18px; right: -18px; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ic-line); border-radius: 50%; background: var(--ic-paper-raised); color: var(--ic-ink-soft); box-shadow: 0 8px 20px rgba(26,43,68,0.13); transition: color 120ms ease, background 120ms ease, transform 120ms ease; }
.hero-close .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
.hero-close:hover { background: #fff; color: var(--ic-stamp); transform: translateY(-1px); }
.hero-close:focus-visible { outline: 2px solid var(--ic-stamp); outline-offset: 2px; }
.showcase-invoice-proof { position: relative; overflow: hidden; display: block; border: 1px solid rgba(26,43,68,0.13); border-radius: 10px; background: #E9E5DA; box-shadow: 0 18px 38px rgba(26,43,68,0.16); color: var(--ic-ink); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.showcase-invoice-proof:hover { transform: translateY(-3px); box-shadow: 0 23px 46px rgba(26,43,68,0.2); }
.showcase-invoice-proof img { display: block; width: 100%; height: auto; background: var(--ic-paper-raised); }
.showcase-proof-label { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 5px 7px; border-radius: 5px; background: rgba(16,32,56,0.92); color: #fff; font-family: var(--font-mono); font-size: 7.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.showcase-proof-link { position: absolute; z-index: 2; right: 7px; bottom: 7px; left: 7px; padding: 6px 8px; display: flex; justify-content: space-between; gap: 8px; border-radius: 5px; background: rgba(251,250,246,0.95); color: var(--ic-stamp-dark); font-size: 8.5px; font-weight: 700; }
.hero-invoice-proof { position: absolute; z-index: 1; top: 42px; right: 0; width: 190px; }
.hero-eyebrow { display: none; }
.hero-headline { font-family: var(--font-display); font-size: clamp(32px, 3.5vw, 48px); line-height: 1.05; margin: 14px 0 18px; color: var(--ic-ink); }
.hero-sub { max-width: 780px; margin: 0 0 16px; color: var(--ic-ink-soft); font-size: 16px; line-height: 1.8; }
.hero-document-types { max-width: 850px; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.hero-document-types li { min-height: 36px; padding: 6px 11px 6px 7px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(26,43,68,0.1); border-radius: 8px; background: var(--ic-paper); color: var(--ic-ink); font-size: 12.5px; font-weight: 600; }
.hero-type-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--ic-paper-raised); color: var(--ic-stamp); }
.hero-type-icon .ui-icon { width: 14px; height: 14px; flex-basis: 14px; }
.hero-signature-features { width: 100%; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero-signature-feature { min-height: 104px; padding: 16px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: start; border-radius: 12px; }
.hero-signature-feature strong { display: block; margin: 1px 0 5px; font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.2; }
.hero-signature-feature > div > span { display: block; font-size: 12px; line-height: 1.55; }
.hero-signature-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.hero-signature-icon .ui-icon { width: 21px; height: 21px; flex-basis: 21px; }
.hero-signature-feature-qr { border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(145deg, #102038 0%, #1A3151 100%); color: #fff; box-shadow: 0 12px 26px rgba(16,32,56,0.16); }
.hero-signature-feature-qr .hero-signature-icon { background: rgba(255,255,255,0.1); color: #F4B2B2; }
.hero-signature-feature-qr > div > span { color: rgba(242,239,230,0.74); }
.hero-signature-feature-logo { border: 1px solid rgba(26,43,68,0.11); background: var(--ic-paper); color: var(--ic-ink); }
.hero-signature-feature-logo .hero-signature-icon { background: var(--ic-paper-raised); color: var(--ic-stamp); box-shadow: 0 4px 12px rgba(26,43,68,0.07); }
.hero-signature-feature-logo > div > span { color: var(--ic-ink-soft); }
.hero-links { margin: 0; color: var(--ic-ink-soft); font-size: 15px; }
.hero-links a { color: var(--ic-stamp); text-decoration: none; font-weight: 600; }
.hero-links a:hover { text-decoration: underline; }
.hero-footer-row { display: flex; align-items: center; gap: 20px; }
.hero-start-button, .showcase-primary-link { min-height: 42px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 8px; background: linear-gradient(180deg, #BC4141 0%, #A93232 100%); color: #fff; box-shadow: 0 8px 20px rgba(178,59,59,0.24); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; transition: transform 140ms ease, box-shadow 140ms ease; }
.hero-start-button:hover, .showcase-primary-link:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(178,59,59,0.3); }
.hero-start-button:focus-visible, .showcase-primary-link:focus-visible { outline: 2px solid var(--ic-stamp-dark); outline-offset: 3px; }
.hero-footer-row .hero-links { flex: 1; font-size: 13.5px; }
.faq-block { width: min(1120px, calc(100% - 40px)); display: grid; grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr); gap: clamp(32px, 5vw, 72px); margin: 42px auto; padding: clamp(34px, 5vw, 58px); border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; background: linear-gradient(145deg, #102038 0%, #172C49 100%); color: var(--ic-paper); box-shadow: 0 26px 64px rgba(13,24,41,0.24); }
.faq-intro { align-self: start; padding-top: 4px; }
.faq-kicker { display: inline-flex; align-items: center; margin-bottom: 18px; color: #F4B2B2; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.faq-kicker::before { content: ''; width: 22px; height: 1px; margin-right: 9px; background: var(--ic-stamp); }
.faq-block h2 { margin: 0 0 18px; color: #fff; font-family: var(--font-display); font-size: clamp(29px, 3vw, 39px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
.faq-intro p { max-width: 330px; margin: 0 0 22px; color: rgba(242,239,230,0.72); font-size: 14px; line-height: 1.75; }
.faq-guide-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.faq-guide-link span { color: #F4B2B2; font-size: 17px; transition: transform 140ms ease; }
.faq-guide-link:hover span { transform: translateX(3px); }
.faq-list { display: grid; align-content: start; gap: 9px; }
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; background: rgba(255,255,255,0.99); border: 1px solid rgba(26,43,68,0.12); border-radius: 11px; box-shadow: 0 18px 44px rgba(13,24,41,0.22); padding: 6px; z-index: 200; }
.dropdown-menu.hidden { display: none; }
.dropdown-item { width: 100%; border: none; border-radius: 7px; background: transparent; text-align: left; padding: 10px 11px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ic-ink); cursor: pointer; }
.dropdown-item:hover { background: rgba(178,59,59,0.075); color: var(--ic-stamp-dark); }
.dropdown-menu .dropdown-item { display: flex; align-items: center; gap: 10px; }
.dropdown-menu .dropdown-item .ui-icon { width: 17px; height: 17px; flex-basis: 17px; color: var(--ic-ink-soft); }
.dropdown-menu .dropdown-item:hover .ui-icon { color: var(--ic-stamp); }

.hero-eyebrow { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--ic-paper-raised); color: var(--ic-stamp); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; box-shadow: 0 6px 18px rgba(26,43,68,0.06); }
.hero-strip { margin-top: 8px; }

.faq-block details { margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; background: rgba(255,255,255,0.055); transition: border-color 140ms ease, background 140ms ease; }
.faq-block details:hover { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.075); }
.faq-block details[open] { border-color: rgba(244,178,178,0.34); background: rgba(255,255,255,0.09); }
.faq-block details > summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) 24px; gap: 13px; align-items: center; padding: 13px 15px; cursor: pointer; list-style: none; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; }
.faq-question-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ic-paper-raised); color: var(--ic-stamp); box-shadow: 0 4px 12px rgba(5,13,25,0.16); }
.faq-question-icon .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.faq-toggle { position: relative; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.faq-toggle::before, .faq-toggle::after { content: ''; position: absolute; left: 7px; top: 11px; width: 10px; height: 1.5px; border-radius: 2px; background: rgba(255,255,255,0.78); transition: transform 150ms ease; }
.faq-toggle::after { transform: rotate(90deg); }
.faq-block details[open] .faq-toggle::after { transform: rotate(0); }
.faq-answer { padding: 0 54px 17px 66px; }
.faq-answer p { margin: 0; padding: 0; color: rgba(242,239,230,0.76); font-size: 13.5px; line-height: 1.7; }
.faq-answer a { color: #F4B2B2; }
.faq-block summary::marker { display: none; }
.faq-block summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) {
  .hero-expanded-content { display: flex; flex-direction: column; }
  .hero-intro-copy { min-height: 0; padding-right: 0; order: 1; }
  .hero-invoice-proof { position: relative; top: auto; right: auto; width: 160px; margin: 2px 0 22px auto; order: 2; }
  .hero-signature-features { order: 3; }
  .hero-footer-row { align-items: flex-start; flex-direction: column; order: 4; }
  .hero-signature-features { grid-template-columns: 1fr; }
  .faq-block { width: calc(100% - 24px); grid-template-columns: 1fr; gap: 28px; margin: 28px auto; padding: 28px 18px 20px; border-radius: 17px; }
  .faq-block h2 { font-size: 30px; }
  .faq-intro p { max-width: none; }
  .faq-block details > summary { grid-template-columns: 34px minmax(0, 1fr) 22px; gap: 11px; padding: 12px; }
  .faq-question-icon { width: 34px; height: 34px; }
  .faq-answer { padding: 0 45px 15px 57px; }
}
.hidden { display: none !important; }
  .template-chip { min-height: 32px; padding: 6px 12px; border-radius: 7px; border: 0; background: transparent; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.055em; text-transform: uppercase; color: var(--ic-ink-soft); display: inline-flex; align-items: center; gap: 7px; transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease; }
  .template-chip .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
.template-chip:hover { background: rgba(26,43,68,0.06); color: var(--ic-ink); }
.template-chip.active { background: var(--ic-ink); color: var(--ic-paper); box-shadow: 0 4px 12px rgba(26,43,68,0.18); }
.section { border: 1px solid var(--ic-line); border-radius: 6px; margin-bottom: 12px; background: var(--ic-paper-raised); overflow: hidden; }
.section > summary { padding: 12px 14px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; list-style: none; background: var(--ic-paper-raised); }
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; margin: 0 10px 3px 2px; border-right: 1.5px solid var(--ic-stamp); border-bottom: 1.5px solid var(--ic-stamp); transform: rotate(45deg); transition: transform 140ms ease; }
.section[open] > summary::before { transform: rotate(225deg); margin-bottom: -3px; }
.section-body { padding: 4px 14px 14px; }
  .field { margin-bottom: 10px; }
  .field label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ic-ink-soft); margin-bottom: 4px; }
  .field label svg { width: 16px; height: 16px; display: inline-block; flex: 0 0 16px; }
  .field input, .field select, .field textarea { width: 100%; padding: 8px 9px; border: 1px solid var(--ic-line); border-radius: 4px; background: #fff; }
.field textarea { resize: vertical; min-height: 52px; }
.field.has-validation-error label { color: var(--ic-danger); }
.field.has-validation-error input,
.field.has-validation-error select,
.field.has-validation-error textarea { border-color: rgba(166,67,46,0.78); background: #FFF9F6; box-shadow: 0 0 0 3px rgba(166,67,46,0.11); }
.field.has-validation-error input:focus,
.field.has-validation-error select:focus,
.field.has-validation-error textarea:focus { outline: 2px solid rgba(166,67,46,0.42); outline-offset: 1px; }
.field-error-message, .section-error-message { margin-top: 6px; color: var(--ic-danger); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.section-error-message { margin: 2px 0 12px; padding: 9px 10px; border-left: 3px solid var(--ic-danger); border-radius: 0 6px 6px 0; background: rgba(166,67,46,0.07); }
.section.has-validation-error { border-color: rgba(166,67,46,0.52); box-shadow: 0 0 0 3px rgba(166,67,46,0.055); }
.section.has-validation-error > summary { color: var(--ic-danger); }
.validation-summary { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(166,67,46,0.25); border-radius: 8px; background: rgba(166,67,46,0.07); color: var(--ic-danger); font-size: 12px; font-weight: 600; line-height: 1.45; }
.field-row { display: flex; gap: 8px; }
.field-row > .field { flex: 1; }
.adjustment-option { border: 1px solid var(--ic-line); border-radius: 8px; background: #fff; transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.adjustment-option + .adjustment-option { margin-top: 10px; }
.adjustment-option + .adjustment-fields,
.adjustment-fields + .adjustment-option { margin-top: 8px; }
.adjustment-option.is-active { border-color: rgba(178,59,59,0.42); background: rgba(178,59,59,0.035); box-shadow: 0 0 0 3px rgba(178,59,59,0.045); }
.adjustment-toggle { min-height: 62px; padding: 10px 11px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.adjustment-checkbox { order: 3; position: relative; width: 34px !important; height: 20px; min-height: 20px !important; flex: 0 0 34px; margin: 0; padding: 0 !important; appearance: none; -webkit-appearance: none; border: 1px solid var(--ic-line); border-radius: 999px; background: var(--ic-paper); cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }
.adjustment-checkbox::before { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ic-ink-soft); transition: transform 140ms ease, background 140ms ease; }
.adjustment-icon { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ic-paper); color: var(--ic-ink-soft); }
.adjustment-icon .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.adjustment-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.adjustment-title { color: var(--ic-ink); font-size: 13px; font-weight: 700; line-height: 1.25; }
.adjustment-description { color: var(--ic-ink-soft); font-size: 11px; line-height: 1.35; }
.adjustment-checkbox:checked ~ .adjustment-icon { background: rgba(178,59,59,0.1); color: var(--ic-stamp); }
.adjustment-checkbox:checked { border-color: var(--ic-stamp); background: var(--ic-stamp); }
.adjustment-checkbox:checked::before { background: #fff; transform: translateX(14px); }
.adjustment-checkbox:focus-visible { outline: 2px solid var(--ic-stamp); outline-offset: 3px; }
.adjustment-fields { padding: 11px 11px 1px; border: 1px solid var(--ic-line); border-radius: 8px; background: var(--ic-paper); }
.adjustment-fields + .adjustment-option { margin-top: 10px; }
.payment-context-note { margin: 0 0 10px; padding: 9px 10px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid rgba(26,43,68,0.1); border-radius: 7px; background: var(--ic-paper); color: var(--ic-ink-soft); font-size: 11.5px; line-height: 1.5; }
.payment-context-note .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; color: var(--ic-sage); }
.payment-context-note strong { color: var(--ic-ink); }
.payment-context-note.is-warning { border-color: rgba(201,154,61,0.34); background: rgba(201,154,61,0.09); color: var(--ic-ink); }
.payment-context-note.is-warning .ui-icon { color: #9A6C18; }
.payment-context-note.is-muted { border-style: dashed; background: transparent; color: var(--ic-ink-soft); }
.item-row { border: 1px solid var(--ic-line); border-radius: 4px; padding: 10px; margin-bottom: 8px; background: #fff; position: relative; }
.item-row .field-row { margin-bottom: 6px; }
.item-row .remove-item { position: absolute; top: 8px; right: 8px; background: none; border: none; color: var(--ic-stamp); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; transition: background 120ms ease, transform 120ms ease; }
.item-row .remove-item .ui-icon { width: 14px; height: 14px; flex-basis: 14px; }
.item-row .remove-item:hover { background: rgba(178,59,59,0.08); transform: translateY(-1px); }
.add-btn { background: var(--ic-paper); border: 1px dashed var(--ic-line); color: var(--ic-ink-soft); width: 100%; padding: 8px; border-radius: 4px; font-size: 12px; font-family: var(--font-mono); }
.add-btn { background: var(--ic-paper); border: 1px dashed var(--ic-line); color: var(--ic-ink-soft); width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.add-btn:hover { border-color: var(--ic-stamp); color: var(--ic-stamp); transform: translateY(-1px); }
.add-btn .ui-icon { width: 18px; height: 18px; flex-basis: 18px; }
.add-btn span { font-size: 14px; color: var(--ic-ink-soft); }
.swatch-row { display: flex; gap: 6px; margin-bottom: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--ic-ink); }
.logo-preview { width: 56px; height: 56px; border: 1px dashed var(--ic-line); border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 8px; background: #fff; }
.logo-preview img { max-width: 100%; max-height: 100%; }
.hint { font-size: 11px; color: var(--ic-ink-soft); margin-top: 4px; line-height: 1.4; }
.error-text { font-size: 11.5px; color: var(--ic-danger); margin-top: 6px; }
.page { width: 720px; max-width: 100%; background: var(--ic-paper-raised); box-shadow: 0 12px 36px rgba(26,43,68,0.12); padding: 48px 44px; font-size: 13px; color: var(--ic-ink); border-radius: 8px; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.pv-brand { display: flex; align-items: center; gap: 10px; }
.pv-brand img { height: 42px; }
.pv-wordmark { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.pv-wordmark em { font-style: italic; font-weight: 500; color: var(--accent, var(--ic-stamp)); }
.pv-doclabel { font-family: var(--font-display); font-weight: 600; font-size: 24px; text-align: right; }
.pv-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ic-ink-soft); text-align: right; margin-top: 4px; line-height: 1.6; }
.pv-parties { display: flex; gap: 24px; margin-bottom: 22px; }
.pv-party { flex: 1; }
.pv-party-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent, var(--ic-stamp)); margin-bottom: 4px; }
.pv-party-name { font-weight: 600; margin-bottom: 2px; }
.pv-party-line { color: var(--ic-ink-soft); font-size: 12px; line-height: 1.5; }
.pv-contact-list { display: grid; gap: 3px; margin-top: 4px; }
.pv-contact-row { display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 6px; align-items: start; color: var(--ic-ink-soft); font-size: 11.5px; line-height: 1.45; }
.pv-contact-icon { width: 12px; height: 12px; margin-top: 2px; fill: none; stroke: var(--accent, var(--ic-stamp)); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pv-contact-text { min-width: 0; overflow-wrap: anywhere; }
.pv-contact-text > span { display: block; }
.pv-contact-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
table.pv-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
table.pv-table th { text-align: left; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ic-ink-soft); border-bottom: 1.5px solid var(--ic-ink); padding: 6px 4px; }
table.pv-table td { padding: 8px 4px; border-bottom: 1px solid var(--ic-line); font-size: 12.5px; vertical-align: top; white-space: normal; word-break: break-word; }
table.pv-table td.num, table.pv-table th.num { text-align: right; font-family: var(--font-mono); }
.pv-totals { width: 260px; margin-left: auto; }
.pv-totals-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12.5px; }
.pv-totals-row.grand { font-weight: 700; font-family: var(--font-mono); font-size: 15px; border-top: 2px solid var(--ic-ink); margin-top: 6px; padding-top: 10px; }
.pv-totals-row .amt { font-family: var(--font-mono); }
.pv-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 28px; gap: 20px; }
.pv-notes { font-size: 11.5px; color: var(--ic-ink-soft); max-width: 340px; line-height: 1.6; }
.pv-payment { font-family: var(--font-mono); font-size: 11px; color: var(--ic-ink-soft); line-height: 1.7; }
.pv-powered-by { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 9px; border-top: 1px solid rgba(26,43,68,0.09); }
.pv-powered-link { display: inline-flex; align-items: center; gap: 5px; color: rgba(26,43,68,0.58); font-family: var(--font-mono); font-size: 8.5px; line-height: 1; letter-spacing: 0.025em; text-decoration: none; white-space: nowrap; }
.pv-powered-link:hover { color: var(--accent, var(--ic-stamp)); }
.pv-powered-mark { width: 12px; height: 12px; fill: none; stroke: var(--accent, var(--ic-stamp)); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.qr-mount { width: 96px; min-height: 96px; }
.qr-mount.has-qr { min-height: 108px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.qr-mount canvas, .qr-mount img { display: block; }
.qr-label { color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 8px; font-weight: 600; letter-spacing: 0.08em; line-height: 1; text-transform: uppercase; }
.qr-error { font-size: 10px; color: var(--ic-ink-soft); width: 120px; line-height: 1.4; font-family: var(--font-body); }
.tpl-banner .pv-band { background: var(--accent, var(--ic-stamp)); color: var(--ic-paper-raised); margin: -44px -40px 24px; padding: 32px 40px; }
.tpl-banner .pv-band .pv-wordmark { color: var(--ic-paper-raised); }
.tpl-banner .pv-band .pv-wordmark em { color: #F2D9CE; }
.tpl-banner .pv-band .pv-doclabel { color: var(--ic-paper-raised); }
.tpl-banner .pv-band .pv-meta { color: rgba(242,239,230,0.75); }
.tpl-postmark { background: var(--ic-paper); }
.tpl-postmark .pv-totals { background: var(--ic-paper-raised); border: 1px solid var(--ic-line); border-radius: 6px; padding: 14px 16px; width: 280px; }
.stamp-seal { width: 70px; height: 70px; transform: rotate(-7deg); }
.doc-page { max-width: 720px; margin: 0 auto; padding: 64px 24px 100px; }
.doc-page h1 { font-family: var(--font-display); font-weight: 600; font-size: 34px; margin-bottom: 8px; }
.doc-page h2 { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin-top: 32px; margin-bottom: 10px; }
.doc-page p { margin-bottom: 14px; color: var(--ic-ink-soft); font-size: 14.5px; }
.doc-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ic-stamp); margin-bottom: 14px; }
.hidden { display: none !important; }
.toast-root { position: fixed; left: 20px; bottom: 24px; z-index: 220; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; max-width: 420px; width: auto; }
.toast { pointer-events: auto; background: rgba(26,43,68,0.96); color: var(--ic-paper); padding: 8px 12px; border-radius: 8px; box-shadow: 0 8px 30px rgba(26,43,68,0.18); font-family: var(--font-body); font-size: 13px; opacity: 0; transform: translateY(8px) scale(.98); transition: opacity 160ms ease, transform 200ms ease; min-width: 140px; max-width: 420px; width: auto; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }

.save-status { font-family: var(--font-mono); font-size: 12px; color: rgba(242,239,230,0.8); padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,0.06); }

.snackbar { pointer-events: auto; background: rgba(26,43,68,0.96); color: var(--ic-paper); padding: 10px 12px; border-radius: 8px; box-shadow: 0 8px 30px rgba(26,43,68,0.18); font-family: var(--font-body); font-size: 13px; display: flex; gap: 12px; align-items: center; min-width: 160px; max-width: 420px; width: auto; box-sizing: border-box; }
.snackbar button { background: transparent; border: none; color: #fff; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.snackbar button:focus { outline: 2px solid rgba(255,255,255,0.2); }
.footer-note { padding: 14px 20px; text-align: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--ic-ink-soft); border-top: 1px solid var(--ic-line); }
.footer-note a { color: var(--ic-ink-soft); margin: 0 6px; }
.page-nav { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.nav-link { color: rgba(242,239,230,0.8); text-decoration: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 8px; border-radius: 999px; }
.nav-link:hover, .nav-link.active { color: var(--ic-paper); background: rgba(242,239,230,0.12); }

/* Shared site chrome for documentation, samples, and template pages */
invoicecraftly-header { display: block; position: sticky; top: 0; z-index: 80; background: #102038; }
.site-header { background: linear-gradient(135deg, #102038 0%, #172942 100%); color: var(--ic-paper); border-bottom: 1px solid rgba(242,239,230,0.08); box-shadow: 0 10px 30px rgba(9,19,34,0.14); }
.site-header-inner { width: min(1240px, calc(100% - 48px)); min-height: 78px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 30px; }
.site-header .brand { order: initial; gap: 11px; }
.site-header .brand-mark { width: 37px; height: 37px; }
.site-header .brand-word { font-size: 25px; }
.site-nav { justify-self: end; gap: 3px; }
.site-header .nav-link { position: relative; padding: 9px 11px; border-radius: 8px; color: rgba(242,239,230,0.72); font-size: 10.5px; font-weight: 500; transition: color 140ms ease, background 140ms ease; }
.site-header .nav-link:hover { color: #fff; background: rgba(242,239,230,0.07); }
.site-header .nav-link.active { color: #fff; background: rgba(242,239,230,0.11); box-shadow: inset 0 0 0 1px rgba(242,239,230,0.06); }
.site-header .nav-link.active::after { content: ''; position: absolute; width: 4px; height: 4px; left: 50%; bottom: 3px; border-radius: 50%; background: #F4B2B2; transform: translateX(-50%); }
.site-header-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 9px 14px; border: 1px solid rgba(255,255,255,0.22); border-radius: 9px; background: var(--ic-paper-raised); color: var(--ic-ink); box-shadow: 0 7px 18px rgba(5,13,25,0.16); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.025em; text-decoration: none; white-space: nowrap; transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.site-header-cta:hover { background: #fff; color: var(--ic-stamp-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(5,13,25,0.22); }
.site-header-cta span { color: var(--ic-stamp); font-size: 15px; line-height: 1; }

invoicecraftly-footer { display: block; margin-top: auto; background: #102038; }
.site-footer { background: linear-gradient(145deg, #102038 0%, #172942 100%); color: var(--ic-paper); border-top: 1px solid rgba(242,239,230,0.08); }
.site-footer-inner { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 40px; display: grid; grid-template-columns: minmax(280px, 1.35fr) minmax(420px, 1fr); gap: clamp(56px, 8vw, 110px); }
.site-footer-lead { align-self: start; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ic-paper); text-decoration: none; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-brand .brand-word { font-size: 23px; }
.site-footer-lead > p { max-width: 430px; margin: 18px 0 20px; color: rgba(242,239,230,0.65); font-size: 13.5px; line-height: 1.75; }
.footer-trust { display: inline-flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid rgba(242,239,230,0.1); border-radius: 7px; background: rgba(242,239,230,0.045); color: rgba(242,239,230,0.78); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.03em; }
.footer-trust::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #62B68B; box-shadow: 0 0 0 3px rgba(98,182,139,0.12); }
.site-footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-link-group h2 { margin: 0 0 14px; color: #F4B2B2; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-link-group a { display: block; width: fit-content; margin: 8px 0; color: rgba(242,239,230,0.68); font-size: 12.5px; text-decoration: none; transition: color 120ms ease, transform 120ms ease; }
.footer-link-group a:hover { color: #fff; transform: translateX(2px); }
.site-footer-bottom { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 17px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(242,239,230,0.09); color: rgba(242,239,230,0.42); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.035em; }
.site-footer-bottom span:last-child { text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 820px) {
  .site-header-inner { width: min(100% - 28px, 1240px); min-height: 70px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; }
  .site-header .brand-mark { width: 32px; height: 32px; }
  .site-header .brand-word { font-size: 21px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-header-cta { grid-column: 2; grid-row: 1; min-height: 36px; padding: 7px 11px; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 38px; padding-top: 42px; }
}

@media (max-width: 560px) {
  .site-header .nav-link { padding: 7px 8px; font-size: 9.5px; }
  .site-header-cta { font-size: 0; gap: 6px; }
  .site-header-cta::before { content: attr(data-short-label); font-size: 10px; }
  .site-footer-inner, .site-footer-bottom { width: min(100% - 32px, 1160px); }
  .site-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.doc-shell { max-width: 820px; margin: 0 auto; padding: 64px 28px 100px; }
.doc-shell h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0 0 16px; }
.doc-shell h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 24px 0 12px; }
.doc-intro { font-size: 17px; color: var(--ic-ink-soft); line-height: 1.75; margin-bottom: 26px; }
.policy-updated { margin: -14px 0 27px; color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.035em; }
.doc-card { background: var(--ic-paper-raised); border: 1px solid var(--ic-line); border-radius: 14px; padding: 26px 28px; margin: 18px 0; box-shadow: 0 8px 22px rgba(26,43,68,0.08); }
.doc-card-kicker { margin-bottom: 8px; color: var(--ic-stamp); font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; }
.privacy-summary-card { border-top: 3px solid var(--ic-sage); }
.privacy-summary-card h2, .legal-responsibility-card h2 { margin-top: 0; }
.legal-responsibility-card { scroll-margin-top: 92px; border-left: 4px solid var(--ic-stamp); background: linear-gradient(135deg, #fff 0%, #fff 70%, rgba(178,59,59,0.045) 100%); }
.legal-responsibility-card > p { line-height: 1.75; }
.legal-scope-list { margin-block: 18px; }
.policy-plain-language-note { border-style: dashed; box-shadow: none; }
.policy-plain-language-note p { margin: 0; color: var(--ic-ink-soft); font-size: 12.5px; line-height: 1.7; }
.guide-legal-note { border-left: 3px solid var(--ic-stamp); background: var(--ic-paper); box-shadow: none; }
.guide-legal-note h2 { margin-top: 0; }
.guide-legal-note p { color: var(--ic-ink-soft); line-height: 1.7; }
.guide-legal-note > a { display: inline-flex; align-items: center; gap: 7px; color: var(--ic-stamp-dark); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.guide-legal-note > a span { transition: transform 140ms ease; }
.guide-legal-note > a:hover span { transform: translateX(3px); }
.doc-card.founder-note { padding: 25px 27px 25px 23px; display: grid; grid-template-columns: 174px minmax(0, 1fr); gap: 23px; align-items: center; overflow: visible; border-left: 3px solid var(--ic-stamp); }
.founder-portrait { position: relative; width: 154px; height: 154px; min-height: 0; margin: 0 auto; overflow: hidden; border: 5px solid #fff; border-radius: 50%; background: #D7E2EA; box-shadow: 0 14px 30px rgba(16,32,56,0.2), 0 0 0 1px rgba(26,43,68,0.08); }
.founder-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 27%; transform: scale(1.12); }
.founder-note-copy { min-width: 0; padding: 0; }
.founder-note h2 { margin-top: 0; }
.founder-note p { font-size: 15px; line-height: 1.8; }
.founder-note .founder-signoff { margin: 17px 0 0; padding-top: 13px; border-top: 1px solid var(--ic-line); color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.055em; line-height: 1.4; text-transform: uppercase; }
.founder-signoff span { margin: 0 4px; color: var(--ic-stamp); }
.product-independence { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--ic-line); color: var(--ic-ink-soft); font-size: 11.5px; line-height: 1.6; }
.about-signature-showcase { margin: 28px 0 34px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 28px; align-items: center; overflow: hidden; border: 1px solid var(--ic-line); border-radius: 18px; background: #fff; box-shadow: 0 20px 48px rgba(26,43,68,0.12); }
.about-signature-copy h2 { margin: 0 0 10px; font-size: 27px; line-height: 1.15; }
.about-signature-copy > p { margin: 0 0 17px; color: var(--ic-ink-soft); font-size: 13.5px; line-height: 1.7; }
.about-signature-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.about-signature-features > div { min-height: 70px; padding: 11px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; border: 1px solid var(--ic-line); border-radius: 9px; background: var(--ic-paper); color: var(--ic-ink-soft); font-size: 10.5px; line-height: 1.4; }
.about-signature-features > div:first-child { border-color: rgba(255,255,255,0.08); background: var(--ic-ink); color: rgba(242,239,230,0.72); }
.about-signature-features strong { display: block; margin-bottom: 3px; color: var(--ic-ink); font-size: 11.5px; line-height: 1.3; }
.about-signature-features > div:first-child strong { color: #fff; }
.about-feature-icon { width: 26px; height: 26px; padding: 5px; border-radius: 6px; background: var(--ic-paper-raised); fill: none; stroke: var(--ic-stamp); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.about-signature-features > div:first-child .about-feature-icon { background: rgba(255,255,255,0.1); color: #F4B2B2; stroke: currentColor; }
.about-signature-actions { margin-top: 18px; display: flex; align-items: center; gap: 16px; }
.about-signature-actions > a:not(.showcase-primary-link) { color: var(--ic-stamp-dark); font-size: 11.5px; font-weight: 700; text-decoration: none; }
.about-signature-actions > a:not(.showcase-primary-link):hover { text-decoration: underline; }
.about-invoice-proof { width: 176px; }
.guide-visual-overview { margin: 28px 0 22px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 30px; align-items: center; overflow: hidden; border: 1px solid var(--ic-line); border-radius: 18px; background: linear-gradient(135deg, #fff 0%, #fff 55%, #F3F0E8 100%); box-shadow: 0 20px 48px rgba(26,43,68,0.12); }
.guide-visual-copy h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.13; }
.guide-visual-copy > p { margin: 0 0 18px; color: var(--ic-ink-soft); font-size: 13px; line-height: 1.65; }
.guide-callout-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.guide-callout-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; }
.guide-callout-list li > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ic-ink); color: #fff; box-shadow: 0 3px 8px rgba(26,43,68,0.16); font-family: var(--font-mono); font-size: 10px; font-weight: 600; }
.guide-callout-list strong { display: block; margin-bottom: 1px; color: var(--ic-ink); font-size: 12px; line-height: 1.35; }
.guide-callout-list small { display: block; color: var(--ic-ink-soft); font-size: 10.5px; line-height: 1.4; }
.guide-visual-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 7px; color: var(--ic-stamp-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.guide-visual-link span { transition: transform 140ms ease; }
.guide-visual-link:hover span { transform: translateX(3px); }
.guide-invoice-figure { width: 100%; margin: 0; }
.guide-invoice-image { position: relative; width: min(100%, 252px); margin: 0 auto; }
.guide-invoice-image img { display: block; width: 100%; height: auto; border: 1px solid rgba(26,43,68,0.12); border-radius: 7px; background: var(--ic-paper-raised); box-shadow: 0 16px 34px rgba(26,43,68,0.18); }
.guide-invoice-marker { position: absolute; width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--ic-stamp); color: #fff; box-shadow: 0 3px 9px rgba(13,24,41,0.3); font-family: var(--font-mono); font-size: 9px; font-weight: 600; transform: translate(-50%, -50%); }
.guide-invoice-marker-1 { top: 7%; left: 9%; }
.guide-invoice-marker-2 { top: 27%; left: 51%; }
.guide-invoice-marker-3 { top: 43%; left: 42%; }
.guide-invoice-marker-4 { top: 65%; left: 76%; }
.guide-invoice-marker-5 { top: 88%; left: 87%; }
.guide-invoice-figure figcaption { max-width: 252px; margin: 11px auto 0; color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 8.5px; line-height: 1.5; text-align: center; }
.guide-section-overview { margin: 22px 0 32px; }
.guide-section-heading { margin-bottom: 13px; display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.guide-section-heading h2 { margin: 0; font-size: 22px; }
.guide-section-heading .doc-card-kicker { margin-bottom: 5px; }
.guide-section-heading > p { max-width: 290px; margin: 0 0 2px; color: var(--ic-ink-soft); font-size: 11.5px; line-height: 1.5; text-align: right; }
.guide-section-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.guide-section-map a { min-height: 72px; padding: 11px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; border: 1px solid var(--ic-line); border-radius: 10px; background: var(--ic-paper-raised); color: var(--ic-ink); box-shadow: 0 5px 14px rgba(26,43,68,0.06); text-decoration: none; transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.guide-section-map svg { width: 36px; height: 36px; padding: 8px; border-radius: 8px; background: var(--ic-paper); fill: none; stroke: var(--ic-stamp); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.guide-section-map strong, .guide-section-map small { display: block; }
.guide-section-map strong { margin-bottom: 3px; font-size: 11.5px; line-height: 1.25; }
.guide-section-map small { color: var(--ic-ink-soft); font-size: 9.5px; line-height: 1.35; }
.guide-section-map a:hover { border-color: rgba(178,59,59,0.34); box-shadow: 0 9px 20px rgba(26,43,68,0.1); transform: translateY(-2px); }
.guide-section-map a:focus-visible, .guide-visual-link:focus-visible { outline: 3px solid rgba(178,59,59,0.3); outline-offset: 3px; }
[id^="guide-step-"] { scroll-margin-top: 92px; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.doc-list { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.doc-list li { color: var(--ic-ink-soft); line-height: 1.7; }
.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc-cta p { margin: 0; font-weight: 600; color: var(--ic-ink); }
.doc-cta .tb-btn { align-self: flex-start; }
.template-related h2 { margin-top: 0; }
.template-related-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.template-related-links a { min-height: 46px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--ic-line); border-radius: 8px; background: var(--ic-paper); color: var(--ic-ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.template-related-links a span { color: var(--ic-stamp); transition: transform 140ms ease; }
.template-related-links a:hover { border-color: rgba(178,59,59,0.34); color: var(--ic-stamp-dark); }
.template-related-links a:hover span { transform: translateX(2px); }
@media (max-width: 720px) { .doc-grid { grid-template-columns: 1fr; } .doc-shell h1 { font-size: 30px; } }

/* Samples showcase */
.samples-page { background: var(--ic-paper); }
.samples-hero { position: relative; overflow: hidden; padding: clamp(76px, 10vw, 128px) 24px; background: linear-gradient(145deg, #102038 0%, #1B3150 100%); color: var(--ic-paper); text-align: center; }
.samples-hero::before { content: ''; position: absolute; width: 440px; height: 440px; left: 50%; top: -310px; border: 1px solid rgba(244,178,178,0.18); border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 90px rgba(255,255,255,0.015), 0 0 0 180px rgba(255,255,255,0.012); }
.samples-hero > * { position: relative; z-index: 1; }
.samples-eyebrow { margin-bottom: 16px; color: var(--ic-stamp); font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.samples-hero .samples-eyebrow { color: #F4B2B2; }
.samples-hero h1 { max-width: 820px; margin: 0 auto 22px; font-family: var(--font-display); font-size: clamp(42px, 6vw, 70px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
.samples-hero p { max-width: 690px; margin: 0 auto 30px; color: rgba(242,239,230,0.76); font-size: clamp(15px, 2vw, 18px); line-height: 1.75; }
.samples-primary-cta { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 9px; background: linear-gradient(180deg, #BC4141 0%, #A93232 100%); color: #fff; box-shadow: 0 10px 24px rgba(178,59,59,0.28); font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.025em; text-decoration: none; transition: transform 140ms ease, box-shadow 140ms ease; }
.samples-primary-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(178,59,59,0.34); }
.samples-gallery { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: clamp(64px, 8vw, 104px) 0; }
.samples-section-heading { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr); gap: 48px; align-items: end; margin-bottom: 44px; }
.samples-section-heading h2 { max-width: 720px; margin: 0; font-family: var(--font-display); font-size: clamp(32px, 4.5vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.samples-section-heading > p { margin: 0 0 4px; color: var(--ic-ink-soft); font-size: 14px; line-height: 1.75; }
.samples-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.samples-disclaimer { grid-column: 1 / -1; margin: 28px 0 0; padding: 14px 16px; border: 1px dashed var(--ic-line); border-radius: 9px; background: rgba(255,255,255,0.56); color: var(--ic-ink-soft); font-size: 11.5px; line-height: 1.65; }
.samples-disclaimer strong { color: var(--ic-ink); }
.sample-card { overflow: hidden; border: 1px solid var(--ic-line); border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(26,43,68,0.1); transition: transform 180ms ease, box-shadow 180ms ease; }
.sample-card:hover { transform: translateY(-4px); box-shadow: 0 24px 54px rgba(26,43,68,0.15); }
.sample-preview { position: relative; display: block; padding: 28px 54px 0; overflow: hidden; background: radial-gradient(circle at 1px 1px, rgba(26,43,68,0.055) 1px, transparent 0), #EDE9DF; background-size: 18px 18px; text-decoration: none; }
.sample-preview img { display: block; width: 100%; height: auto; border: 1px solid rgba(26,43,68,0.1); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--ic-paper-raised); box-shadow: 0 16px 32px rgba(26,43,68,0.16); transition: transform 220ms ease; }
.sample-card:hover .sample-preview img { transform: translateY(-5px); }
.sample-preview-action { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 7px; background: rgba(16,32,56,0.94); color: #fff; box-shadow: 0 8px 22px rgba(13,24,41,0.22); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.025em; opacity: 0; transform: translateY(5px); transition: opacity 160ms ease, transform 160ms ease; }
.sample-preview:hover .sample-preview-action, .sample-preview:focus-visible .sample-preview-action { opacity: 1; transform: translateY(0); }
.sample-card-body { padding: 25px 28px 28px; }
.sample-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.sample-meta span { padding: 5px 8px; border-radius: 5px; background: var(--ic-paper); color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.sample-meta span:first-child { background: rgba(178,59,59,0.09); color: var(--ic-stamp-dark); }
.sample-card h3 { margin: 0 0 9px; font-family: var(--font-display); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; }
.sample-card p { margin: 0 0 20px; color: var(--ic-ink-soft); font-size: 13.5px; line-height: 1.7; }
.sample-card-body > a { display: inline-flex; align-items: center; gap: 7px; color: var(--ic-stamp-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.sample-card-body > a span { transition: transform 140ms ease; }
.sample-card-body > a:hover span { transform: translateX(3px); }
.sample-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr); }
.sample-card-wide .sample-preview { min-height: 100%; padding-inline: clamp(42px, 7vw, 74px); }
.sample-card-wide .sample-card-body { align-self: center; padding: clamp(34px, 5vw, 58px); }
.sample-card-wide h3 { font-size: clamp(27px, 3vw, 36px); }
.sample-card-wide p { max-width: 500px; font-size: 14px; }
.samples-closing { width: min(1120px, calc(100% - 40px)); display: flex; justify-content: space-between; align-items: center; gap: 32px; margin: 0 auto 80px; padding: clamp(32px, 5vw, 54px); border-radius: 20px; background: #fff; border: 1px solid var(--ic-line); box-shadow: 0 18px 44px rgba(26,43,68,0.1); }
.samples-closing h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.08; }
.samples-closing p { margin: 0; color: var(--ic-ink-soft); }
.samples-closing > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 8px; background: var(--ic-ink); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-decoration: none; }
@media (max-width: 760px) {
  .samples-section-heading { grid-template-columns: 1fr; gap: 18px; }
  .samples-grid { grid-template-columns: 1fr; }
  .sample-card-wide { grid-column: auto; display: block; }
  .sample-preview { padding: 20px 34px 0; }
  .samples-closing { align-items: flex-start; flex-direction: column; }
}
.modal-backdrop { position: fixed; inset: 0; background: rgba(26,43,68,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--ic-paper-raised); border-radius: 8px; padding: 24px; width: 420px; max-width: 100%; max-height: 85vh; overflow-y: auto; }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 14px; }
.modal-close { float: right; background: none; border: none; font-size: 18px; color: var(--ic-ink-soft); }

/* History panel */
.history-panel { position: fixed; right: 20px; top: 72px; width: 360px; height: calc(100vh - 92px); background: var(--ic-paper-raised); border: 1px solid var(--ic-line); border-radius: 8px; box-shadow: 0 12px 36px rgba(26,43,68,0.12); padding: 12px; z-index: 260; overflow: auto; }
.history-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.history-controls { display: flex; gap: 6px; align-items: center; }
.history-controls .tb-btn { padding: 6px 8px; font-size: 12px; }
.history-list { display: grid; gap: 8px; }
.history-item { padding: 10px; background: #fff; border-radius: 6px; border: 1px solid var(--ic-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 13px; }
.history-item small { color: var(--ic-ink-soft); }
.history-item button { font-family: var(--font-mono); font-size: 12px; }
.history-item .saved-tick { width: 18px; height: 18px; border-radius: 4px; background: #3CB371; display:inline-block; margin-right:8px; }

/* Responsive layout system */
html { overflow-x: hidden; }
body { min-width: 0; overflow-x: hidden; }
button, a, select, input, textarea { touch-action: manipulation; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Editor toolbar and workspace */
.editor-tools { display: flex; min-width: 0; align-items: center; gap: 10px; }
.workspace-mobile-tabs { display: none; }
#preview-surface { position: relative; width: 720px; max-width: 100%; }
.preview-document { width: 720px; transform: scale(1); transform-origin: top left; }
.preview-document .page { width: 720px; max-width: none; }
.preview-pane { overflow-y: auto; scrollbar-width: none; }
.preview-pane::-webkit-scrollbar { display: none; }
.invoice-export-host { position: fixed; top: 0; left: 0; width: 720px; z-index: -10000; pointer-events: none; }
.invoice-export-host .page { width: 720px; max-width: none; }

/* Shared header mobile navigation */
.site-menu-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(242,239,230,0.16); border-radius: 9px; background: rgba(242,239,230,0.055); color: var(--ic-paper); }
.site-menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.site-menu-toggle:focus-visible { outline: 2px solid #F4B2B2; outline-offset: 2px; }

@media (max-width: 1500px) {
  .topbar-actions { align-items: flex-start; }
  .editor-tools { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .topbar { position: relative; padding: 12px 16px 14px; }
  .topbar-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 9px; }
  .topbar-actions > .page-nav { width: 100%; justify-content: flex-start; padding-bottom: 2px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .topbar-actions > .page-nav::-webkit-scrollbar { display: none; }
  .topbar-actions > .page-nav .nav-link { flex: 0 0 auto; min-height: 34px; display: inline-flex; align-items: center; }
  .editor-tools { display: grid; grid-template-columns: minmax(170px, 1fr) auto auto auto auto auto; width: 100%; gap: 8px; }
  .editor-tools .tb-select { width: 100%; min-width: 0; }

  .workspace-mobile-tabs { position: sticky; top: 0; z-index: 45; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 7px 12px; border-block: 1px solid var(--ic-line); background: rgba(242,239,230,0.96); box-shadow: 0 7px 18px rgba(26,43,68,0.08); backdrop-filter: blur(12px); }
  .workspace-mobile-tabs button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--ic-ink-soft); font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.035em; }
  .workspace-mobile-tabs button[aria-selected="true"] { background: var(--ic-ink); color: #fff; box-shadow: 0 5px 14px rgba(26,43,68,0.18); }
  .workspace-mobile-tabs button:focus-visible { outline: 2px solid var(--ic-stamp); outline-offset: 1px; }

  .workspace { display: block; width: 100%; height: auto; max-height: none; }
  .workspace[data-mobile-view="editor"] .preview-pane,
  .workspace[data-mobile-view="preview"] .editor-pane { display: none; }
  .editor-pane, .preview-pane { width: 100%; height: auto; min-height: 0; overflow: visible; }
  .editor-pane { padding: 18px 16px 28px; border-right: 0; border-bottom: 1px solid var(--ic-line); }
  .preview-pane { min-height: min(760px, 80dvh); padding: 20px 14px 34px; overflow: hidden; }
  .preview-controls { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
  .preview-controls::-webkit-scrollbar { display: none; }
  .template-chip { flex: 0 0 auto; min-height: 38px; }
  .preview-top { width: 720px; max-width: 100%; margin-bottom: 10px; }

  .hero-strip { width: calc(100% - 32px); margin: 16px auto; padding: 28px; }
  .hero-headline { font-size: clamp(30px, 7vw, 40px); }
  .hero-sub { font-size: 15px; line-height: 1.7; }

  .history-panel { inset: 10px; width: auto; height: auto; max-height: calc(100dvh - 20px); border-radius: 14px; padding: 14px; }
  .history-header { align-items: flex-start; flex-direction: column; }
  .history-header h3 { margin: 0; }
  .history-controls { width: 100%; flex-wrap: wrap; }
}

@media (max-width: 820px) {
  invoicecraftly-header { position: sticky; top: 0; }
  .site-header-inner { width: min(100% - 24px, 1240px); min-height: 68px; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 10px 0; }
  .site-header .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .site-header .brand-mark { width: 32px; height: 32px; }
  .site-header .brand-word { overflow: hidden; font-size: 21px; text-overflow: ellipsis; }
  .site-header-cta { grid-column: 2; grid-row: 1; min-height: 40px; padding: 8px 11px; }
  .site-menu-toggle { display: inline-flex; grid-column: 3; grid-row: 1; }
  .site-nav { display: none; grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 5px; padding: 8px 0 4px; overflow: visible; }
  .site-header.menu-open .site-nav { display: grid; }
  .site-header .site-nav .nav-link { min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 8px 10px; border: 1px solid rgba(242,239,230,0.07); background: rgba(242,239,230,0.035); font-size: 10px; }
  .site-header .site-nav .nav-link.active { background: rgba(242,239,230,0.12); }
  .site-header .site-nav .nav-link.active::after { bottom: 5px; }

  .site-footer-inner { width: min(100% - 36px, 1160px); grid-template-columns: 1fr; gap: 36px; padding: 42px 0 32px; }
  .site-footer-nav { gap: 24px; }
  .site-footer-bottom { width: min(100% - 36px, 1160px); }
}

@media (max-width: 720px) {
  .doc-shell { width: 100%; padding: 44px 18px 70px; }
  .doc-shell h1 { font-size: clamp(29px, 8vw, 36px); }
  .doc-shell h2 { font-size: 20px; line-height: 1.25; }
  .doc-intro { margin-bottom: 22px; font-size: 16px; line-height: 1.65; }
  .doc-card { margin: 14px 0; padding: 22px 20px; border-radius: 12px; }
  .doc-card.founder-note { padding: 24px 20px 22px; grid-template-columns: 1fr; gap: 19px; }
  .founder-portrait { width: 138px; height: 138px; }
  .founder-portrait img { object-position: center 27%; }
  .founder-note-copy { padding: 0; }
  .about-signature-showcase { padding: 22px 20px; grid-template-columns: 1fr; }
  .about-invoice-proof { width: 170px; justify-self: end; }
  .guide-visual-overview { padding: 24px 22px; grid-template-columns: 1fr; gap: 27px; }
  .guide-visual-copy h2 { font-size: 25px; }
  .guide-invoice-image { width: min(100%, 280px); }
  .guide-invoice-figure figcaption { max-width: 280px; }
  .guide-section-heading { align-items: start; flex-direction: column; gap: 5px; }
  .guide-section-heading > p { max-width: none; text-align: left; }
  .guide-section-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-list { padding-left: 20px; gap: 8px; }
  .doc-cta { align-items: stretch; flex-direction: column; }
  .doc-cta .tb-btn { width: 100%; min-height: 44px; }
  .template-related-links { grid-template-columns: 1fr; }

  .faq-block { width: calc(100% - 24px); gap: 25px; margin: 28px auto; padding: 28px 18px 20px; }
  .faq-block h2 { font-size: clamp(28px, 8vw, 34px); }
}

@media (max-width: 620px) {
  .topbar { padding-inline: 12px; }
  .topbar .brand { min-width: 0; }
  .brand-word { font-size: 19px; }
  .editor-tools { grid-template-columns: minmax(0, 1fr) 40px auto 40px; }
  .editor-tools .tb-btn, .editor-tools .tb-select { min-height: 42px; height: 42px; }
  .editor-tools .save-status, .editor-tools #btn-history-top { display: none; }
  .editor-tools #btn-new { width: 40px; padding-inline: 0; }
  .editor-tools #btn-new span { display: none; }
  .editor-tools #btn-more { width: 40px; padding-inline: 0; }
  .editor-tools #btn-more > span, .editor-tools #btn-more .chevron { display: none; }
  .editor-tools #btn-export { min-width: 94px; padding-inline: 10px; }
  .dropdown-menu { max-width: calc(100vw - 24px); }

  .warning-banner { align-items: flex-start; padding: 10px 12px; flex-wrap: wrap; }
  .warning-banner button { min-height: 36px; }
  .hero-strip { width: calc(100% - 24px); padding: 24px 20px; border-radius: 14px; }
  .hero-strip.collapsed { width: 100%; padding: 0 14px; border-radius: 0; }
  .hero-strip.collapsed .hero-repeat-summary { min-height: 82px; grid-template-columns: auto minmax(0, 1fr); gap: 9px 14px; padding: 8px 0; }
  .hero-promise-free { grid-column: 1; grid-row: 1; }
  .hero-repeat-right { grid-column: 2; grid-row: 1; justify-self: end; }
  .hero-repeat-center { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .hero-repeat-expand { gap: 12px; }
  .hero-repeat-detail { display: none; }
  .hero-headline { margin-bottom: 14px; }
  .hero-links { font-size: 14px; line-height: 1.65; }
  .hero-close { top: -14px; right: -12px; }
  .hero-footer-row { gap: 14px; }
  .hero-start-button { width: 100%; min-height: 46px; }

  .editor-pane { padding: 12px 10px 24px; }
  .section { margin-bottom: 10px; border-radius: 10px; }
  .section > summary { min-height: 50px; padding: 12px; font-size: 15px; }
  .section-body { padding: 5px 12px 14px; }
  .field { margin-bottom: 12px; }
  .field label { margin-bottom: 6px; }
  .field input, .field select, .field textarea { min-height: 44px; padding: 9px 10px; border-radius: 7px; font-size: 16px; }
  .field textarea { min-height: 76px; }
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .item-row { padding: 12px; border-radius: 8px; }
  .item-row .field-row:first-of-type .field:nth-child(3) { grid-column: 1 / -1; }
  .item-row .remove-item { width: 38px; height: 38px; }
  .add-btn { min-height: 44px; }
  #logo-input { width: 100%; font-size: 14px; }

  .preview-pane { min-height: 66dvh; padding-inline: 10px; }
  .preview-controls { width: 100%; justify-content: flex-start; }
  .preview-top { padding-inline: 2px; }
  .quick-actions { margin-left: auto; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 90dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .toast-root { right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; }
  .toast, .snackbar { width: 100%; max-width: none; }
}

@media (max-width: 560px) {
  .site-header .brand-word { font-size: 20px; }
  .site-header-cta { font-size: 0; gap: 6px; }
  .site-header-cta::before { content: attr(data-short-label); font-size: 10px; }
  .site-footer-inner, .site-footer-bottom { width: min(100% - 28px, 1160px); }
  .site-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .site-footer-nav .footer-link-group:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; }
  .site-footer-nav .footer-link-group:last-child h2 { grid-column: 1 / -1; }
  .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }

  .samples-hero { padding: 62px 18px 66px; }
  .samples-hero::before { width: 330px; height: 330px; top: -230px; box-shadow: 0 0 0 70px rgba(255,255,255,0.015), 0 0 0 140px rgba(255,255,255,0.012); }
  .samples-hero h1 { font-size: clamp(38px, 11vw, 50px); }
  .samples-hero p { font-size: 15px; line-height: 1.65; }
  .samples-primary-cta { min-height: 46px; justify-content: center; }
  .samples-gallery { width: calc(100% - 24px); padding: 52px 0 60px; }
  .samples-section-heading { margin-bottom: 28px; }
  .samples-section-heading h2 { font-size: 32px; }
  .samples-grid { gap: 20px; }
  .sample-card { border-radius: 14px; }
  .sample-preview, .sample-card-wide .sample-preview { min-height: 0; padding: 16px 20px 0; }
  .sample-preview-action { right: 12px; bottom: 12px; opacity: 1; transform: none; }
  .sample-card-body, .sample-card-wide .sample-card-body { padding: 22px 20px 24px; }
  .sample-card h3, .sample-card-wide h3 { font-size: 24px; }
  .samples-closing { width: calc(100% - 24px); margin-bottom: 52px; padding: 28px 22px; border-radius: 16px; }
  .samples-closing > a { width: 100%; min-height: 44px; justify-content: center; }
}

@media (max-width: 440px) {
  .topbar-actions > .page-nav { gap: 2px; }
  .topbar-actions > .page-nav .nav-link { padding-inline: 7px; font-size: 9.5px; }
  .workspace-mobile-tabs { padding-inline: 8px; }
  .faq-block { padding-inline: 13px; }
  .faq-block details > summary { grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 9px; padding: 11px 10px; font-size: 13.5px; }
  .faq-question-icon { width: 32px; height: 32px; }
  .faq-answer { padding: 0 12px 14px 51px; }
  .site-header-inner { width: calc(100% - 20px); }
  .site-header .brand-word { font-size: 18px; }
  .site-header .brand-mark { width: 30px; height: 30px; }
  .site-header-cta { min-height: 38px; padding-inline: 9px; }
  .site-menu-toggle { width: 38px; height: 38px; }
  .hero-repeat-expand .hero-repeat-feature:nth-child(2) { display: none; }
  .hero-invoice-proof { width: 142px; }
  .about-signature-features { grid-template-columns: 1fr; }
  .about-signature-actions { align-items: stretch; flex-direction: column; }
  .about-signature-actions .showcase-primary-link { width: 100%; }
  .founder-portrait { width: 128px; height: 128px; }
  .guide-visual-overview { margin-inline: -2px; padding: 22px 18px; }
  .guide-callout-list { gap: 10px; }
  .guide-section-map { grid-template-columns: 1fr; }
  .guide-section-map a { min-height: 66px; }
}

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
  .item-row .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-row .field-row:first-of-type .field:nth-child(3) { grid-column: 1 / -1; }
  .site-footer-nav { grid-template-columns: 1fr; }
  .site-footer-nav .footer-link-group:last-child { grid-column: auto; display: block; }
}

@media (hover: none) {
  .sample-preview-action { opacity: 1; transform: none; }
  .sample-card:hover, .sample-card:hover .sample-preview img { transform: none; }
}

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