/* IDResize visual system, informed by Stripe's precision-first product language.
   Keep the image and paper as the color; use violet only to signal actions. */
:root {
  --page-max: 1180px;
  --page-gutter: 28px;
  --bg: #f7f8fc;
  --bg-soft: #f0f2f8;
  --surface: #fff;
  --ink: #101f33;
  --muted: #53657d;
  --line: #dce3ed;
  --blue: #533afd;
  --blue-strong: #4434d4;
  --blue-soft: #f0efff;
  --gold: #8f641d;
  --radius-control: 6px;
  --radius-card: 8px;
  --radius-panel: 10px;
  --btn-h: 44px;
  accent-color: #533afd;
  color-scheme: light;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", "Source Sans 3", system-ui, "Noto Sans", "Noto Sans SC", sans-serif;
  font-weight: 400;
  letter-spacing: -.005em;
}
::selection { color: #101f33; background: #dedaff; }
::-webkit-scrollbar-thumb { background: #b8c2d1; }
::-webkit-scrollbar-thumb:hover { background: #8795aa; }
a { color: #4b3ae5; }
a:hover { color: #3025a8; }
:where(button, a, input, select, summary):focus-visible {
  outline: 2px solid #6d5cff;
  outline-offset: 3px;
}

.topbar {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: max(var(--page-gutter), calc((100% - var(--page-max)) / 2));
  height: 70px;
  background: #fff;
  border-bottom-color: var(--line);
}
.brand { color: #101f33; font-weight: 700; }
.brand-mark { color: #533afd; }
.topbar .brand {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  flex-shrink: 0;
  gap: 12px;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.topbar .brand-mark {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #e4dfff;
  border-radius: 8px;
  background: #f5f3ff;
}
.topbar .brand-mark svg { display: block; width: 100%; height: 100%; }
.topbar .brand-wordmark {
  display: block;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.topbar .brand-domain { color: #101f33; }
.topbar .brand-domain-suffix {
  margin-left: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.topbar nav { gap: 20px; }
.topbar nav a {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 42px;
  padding: 0 2px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: #53657d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.topbar nav a[aria-current="page"] { font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: #101f33; background: transparent; }
.topbar nav a[aria-current="page"] {
  color: #3424c6;
  background: transparent;
  border-bottom-color: #533afd;
}
.button,
.home-continue,
.print-download {
  border-color: #533afd;
  background: #533afd;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
.button:hover,
.home-continue:not(:disabled):hover,
.print-download:hover { border-color: #4434d4; background: #4434d4; }
.button:disabled,
.home-continue:disabled { border-color: #c7c4e6; background: #c7c4e6; color: #373258; }
.footer { border-top-color: var(--line); color: #53657d; }
.footer a { color: #4b3ae5; }
.footer-languages { flex:0 0 100%; width:100%; margin-top:6px; padding-top:14px; border-top:1px solid var(--line); }
.footer-language-label { display:block; margin:0 0 8px; color:var(--ink); font-size:12px; font-weight:650; }
.footer-language-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px 16px; max-width:920px; }
.footer-language-grid a { display:flex; align-items:center; min-width:0; min-height:32px; padding:3px 8px; border-radius:6px; color:#53657d; font-size:12px; line-height:1.35; text-decoration:none; overflow-wrap:anywhere; }
.footer-language-grid a:hover { color:#3324bd; background:#f5f4ff; }
.footer-language-grid a[aria-current="page"] { color:#3324bd; background:#eeecff; font-weight:650; }
@media(max-width:900px) { .footer-language-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px 12px; } }
@media(max-width:640px) { .footer-languages { margin-top:10px; padding-top:12px; } .footer-language-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 8px; } }

/* Landing workbench: a neutral studio stage and one clear control surface. */
.home-studio { max-width: 1180px; }
.home-intro {
  border-bottom-color: var(--line);
  padding-top: 36px;
  padding-bottom: 28px;
}
.home-intro h1,
.home-hero h1,
.guide-page > h1,
.print-intro h1 {
  color: #101f33;
  font-weight: 600;
  letter-spacing: -.035em;
}
.home-intro h1 { max-width: 19ch; font-size: clamp(34px, 4.4vw, 50px); }
.home-intro .lead,
.guide-page > .lead,
.print-intro > p { color: #53657d; }
.home-desk {
  margin-top: 28px;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(21, 35, 57, .065);
}
.home-desk-preview {
  background: #f0f2f8;
  border-right-color: #dce3ed;
}
.preview-label { color: #273951; }
.preview-meta,
.preview-foot { color: #53657d; }
.preview-frame { box-shadow: 0 8px 22px rgba(16, 31, 51, .15); }
.home-desk-controls { background: #fff; }
.desk-title { color: #34455c; }
.home-size-option {
  border-color: #dce3ed;
  border-radius: 6px;
  background: #fff;
  color: #101f33;
}
.home-size-option small { color: #53657d; }
.home-size-option:hover { border-color: #978aff; background: #f8f7ff; }
.home-size-option[aria-pressed="true"] {
  border-color: #6555f5;
  background: #f0efff;
  color: #3025a8;
  box-shadow: inset 0 0 0 1px #6555f5;
}
.home-example-link,
.desk-hint a,
.home-more-sizes summary,
.country-all { color: #4434d4; }
.bg-swatch.is-active { border-color: #6555f5; background: #f0efff; color: #3025a8; }
.home-upload { border-color: #b7b1f4; border-radius: 6px; background: #fafaff; }
.home-upload:hover { border-color: #6555f5; background: #f4f2ff; }
.home-continue { justify-content: center; overflow-wrap: anywhere; white-space: normal; }
.home-continue:disabled { opacity: 1; }
.home-capabilities,
.page-home .country-directory,
.page-home .home-faq { border-color: var(--line); }
.cap-list li { border-top-color: #c9cde0; color: #53657d; }
.cap-list strong { color: #101f33; }
.page-home .country-grid { border-top-color: var(--line); }
.page-home .country-grid a { color: #4434d4; }
.page-home .country-grid a:hover { background: #f0efff; }
.page-home .home-faq details { border-color: var(--line); }

/* Country and document pages. */
.guide-page { max-width: 1180px; }
.breadcrumbs { color: #657790; }
.breadcrumbs a { color: #53657d; }
.breadcrumbs a:hover { color: #4434d4; }
.guide-page > h1 { max-width: 40ch; }
.document-card,
.doc-sidebar,
.spec-bar,
.studio-controls,
.canvas-panel {
  border-color: #dce3ed;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(21, 35, 57, .045);
}
.document-card { border-top: 1px solid #dce3ed; }
.document-card h2 { color: #101f33; }
.guide-facts { border-color: #dce3ed; background: #f8f9fc; }
.guide-facts span,
.spec-bar span { color: #53657d; }
.guide-facts strong,
.spec-bar strong { color: #101f33; }
.spec-bar > div { border-color: #dce3ed; }
.country-grid a,
.spoke-grid a,
.country-document-link { color: #4434d4; }
.country-grid a:hover,
.spoke-grid a:hover,
.country-document-link:hover { background: #f0efff; color: #3025a8; }
.country-grid small,
.country-document-copy small { color: #657790; }
.document-card .long-copy { color: #34455c; line-height: 1.75; }
.document-card summary { color: #101f33; }
.src-official,
.country-document-status.is-official,
.country-document-status.is-checked { color: #17673e; }

/* Editing and print spaces keep measurements legible and the image unchanged. */
.studio-controls { background: #fff; }
.studio-stack { padding: 20px; }
.studio-block { border-color: #e1e6ee; }
.studio-controls select,
.studio-controls input[type="number"],
.sheet-settings select,
.sheet-summary select,
.print-page select,
.print-page input[type="number"] {
  border-color: #cbd5e1;
  border-radius: 6px;
  color: #101f33;
}
.field-label,
.control-section-title,
.print-label,
.print-control-row { color: #273951; }
.canvas-toolbar,
.canvas-footer { background: #fff; border-color: #dce3ed; }
.canvas-stage { background-color: #f0f2f8; }
.sheet-preview-wrap,
.print-paper-stage { background: #eef0f6; }
.sheet-dialog { border-color: #dce3ed; border-radius: 10px; }
.print-page { max-width: 1180px; }
.print-intro { border-color: #dce3ed; }
.print-kicker { color: #6555d9; }
.print-controls,
.print-preview-card { border-color: #dce3ed; border-radius: 8px; box-shadow: 0 8px 24px rgba(21, 35, 57, .045); }
.print-upload { border-color: #b7b1f4; background: #fafaff; }
.print-upload:hover { border-color: #6555f5; background: #f4f2ff; }
.print-upload-mark { background: #f0efff; color: #4434d4; }
.print-preview-card { background: #fff; }
.print-paper-stage { border-color: #dce3ed; border-radius: 6px; }
.quiet-button { border-color: #cbd5e1; color: #4434d4; border-radius: 6px; }
.print-check input,
.print-size-confirm input { accent-color: #533afd; }
.print-page :where(button, select, input, summary, a):focus-visible { outline-color: #6d5cff; }
.guide-actions button { white-space: nowrap; overflow-wrap: normal; font-size: 12px; }

@media (max-width: 900px) {
  :root { --page-gutter: 22px; }
  .topbar nav { gap: 16px; }
  .home-desk-preview { border-bottom-color: #dce3ed; }
}
/* Let the shared header wrap before its desktop contents exceed the viewport. */
@media (max-width: 1000px) {
  .topbar,
  .topbar--studio {
    height: auto;
    min-height: 64px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-content: center;
  }
  .brand { min-height: 32px; }
  .topbar nav {
    width: 100%;
    min-width: 0;
    gap: 0 12px;
    overflow: visible;
    flex-wrap: wrap;
    scrollbar-width: none;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { min-height: 38px; flex: 0 0 auto; font-size: 14px; font-weight: 500; letter-spacing: 0; }
}
@media (max-width: 640px) {
  :root { --page-gutter: 16px; }
  .home-intro { padding-top: 24px; padding-bottom: 20px; }
  .home-intro h1 { max-width: 16ch; font-size: 36px; }
  .home-intro .lead { font-size: 14px; }
  .home-desk { margin-top: 16px; }
  .home-desk-preview { padding: 18px; }
  .home-desk-controls { padding: 18px; gap: 18px; }
  .preview-frame { width: min(220px, 68%); }
  .spec-bar > div { padding: 12px; }
  .guide-page { margin-top: 20px; }
  .guide-page > h1 { font-size: 34px; }
  .country-grid a { overflow-wrap: anywhere; }
  .studio-stack { padding: 14px; }
  .print-page { margin-top: 18px; }
  .print-intro h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
