/* BitsToolbox product foundation. Specialized controllers keep their existing CSS. */
:root {
  --text: #172e29; --ink: var(--text); --muted: #526760;
  --bg: #faf9f5; --soft: var(--bg); --surface: #fff; --paper: var(--surface);
  --line: #d7dfd5; --accent: #145d4c; --brand: var(--accent); --brand-dark: #10483c;
  --forest: #153d35; --on-forest: #fbf7e8; --leaf: #c4e9b8;
  --sheet: #fffefa; --linen: #f3f0e5; --mint: #eaf2e7; --rule: #adbcae;
  --green: #23684e; --shadow: 0 4px 20px #18243b06;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --radius: 12px; --content: 1240px;
}
html { scroll-padding-top: 24px; }
body { background: var(--bg); font-size: 15px; line-height: 1.65; }
[hidden] { display: none !important; }
::selection { color: #132a5b; background: #dce7ff; }
svg { flex-shrink: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #779eeb; outline-offset: 3px; }
input, select, textarea { color: var(--text); }
.container { max-width: var(--content); padding-inline: 32px; }
.button { min-height: 44px; border-radius: 8px; font-size: 13px; font-weight: 650; padding: 11px 16px; box-shadow: none; }
.button:hover:not(:disabled) { transform: none; }
.button.secondary { border-color: #d6dee9; color: #334666; }
.site-header { position: relative; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; gap: 20px; flex-wrap: nowrap; }
.logo { gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.045em; flex-shrink: 0; }
.logo em { color: inherit; font-weight: 600; }
.nav { flex: 1; justify-content: center; gap: 2px; }
.header-inner > .nav { order: 1; }
.header-inner > .header-search { order: 2; }
.header-inner > .language-switcher { order: 3; }
.nav a { padding: 10px 9px; font-size: 12px; font-weight: 600; border-radius: 6px; white-space: nowrap; }
.nav a:hover, .nav a.active { background: #edf3ff; color: var(--accent); }
.header-search { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 11px; border-radius: 7px; font-size: 12px; white-space: nowrap; border: 1px solid var(--line); text-decoration: none; }
.header-search svg { width: 16px; height: 16px; }
.header-search span { font-size: inherit; font-weight: 600; }
.language-switcher { position: relative; display: grid; place-items: center; flex: 0 0 40px; height: 40px; color: var(--accent); border: 1px solid var(--line); border-radius: 7px; }
.language-switcher svg { width: 20px; height: 20px; pointer-events: none; }
.language-switcher select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; font-size: 16px; }
.language-switcher select:enabled { cursor: pointer; }
.language-switcher:has(select:enabled:hover) { background: var(--mint); }
.language-switcher:has(select:focus-visible) { outline: 3px solid #779eeb; outline-offset: 3px; }
.language-switcher:has(select:disabled) { color: var(--muted); }
.menu-toggle { display: none; }
.eyebrow { margin: 0 0 16px; color: #63718a; font-size: 10px; font-weight: 750; letter-spacing: .14em; line-height: 1.5; }
.sample-file { background: #fff; border: 1px solid #dce3ed; border-radius: 8px; overflow: hidden; }
.sample-file > div { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #edf0f4; font-size: 11px; }
.sample-file svg { width: 15px; height: 15px; color: #5c7190; }
.sample-file > div span { margin-left: auto; color: #8290a4; font-size: 10px; }
.sample-file pre { margin: 0; padding: 14px 16px; font: 11px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #53647c; overflow: auto; }
.sample-file-output { border-color: #bfcfee; box-shadow: 0 3px 8px #244a9010; }
.sample-file-output > div { color: var(--accent); background: #f7faff; }
.sample-conversion { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 9px; color: #7b8ca5; }
.sample-conversion svg { width: 13px; height: 13px; transform: rotate(90deg); }

.scenario-section { padding: 36px 0; background: #fff; border-bottom: 1px solid var(--line); }
.section-topline { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-topline h2 { font-size: 24px; letter-spacing: -.035em; margin: 0; line-height: 1.3; }
.section-topline .eyebrow { margin-bottom: 7px; font-size: 9px; }
.section-topline > p { margin: 0; font-size: 12px; color: var(--muted); }
.section-topline > a, .text-link { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--accent); }
.section-topline > a svg, .text-link svg { width: 15px; height: 15px; }
.scenario-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 24px; }
.scenario-links > a { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 12px 0; min-width: 0; border-bottom: 1px solid #edf0f4; }
.scenario-icon { color: #7386a5; }
.scenario-icon svg { width: 20px; height: 20px; }
.scenario-links > a > span:nth-child(2) { min-width: 0; }
.scenario-links strong { display: block; font-size: 12px; font-weight: 600; }
.scenario-links small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.scenario-links > a > svg { width: 13px; height: 13px; margin-left: auto; color: #93a1b4; }
.directory-section { padding: 42px 0 50px; border-top: 1px solid var(--line); background: var(--bg); }
.directory-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 32px; }
.directory-sidebar { position: static; min-width: 0; }

.category-nav { gap: 3px; }
.category-link { min-height: 43px; border-radius: 7px; padding: 10px; font-size: 12px; }
.category-link.selected { color: var(--accent); background: #e8effe; }
.category-link svg { width: 16px; height: 16px; }
.category-count { font-size: 10px; }

.directory-toolbar { gap: 20px; align-items: center; margin: 0 0 20px; }
#directory-heading { font-size: 22px; letter-spacing: -.035em; }
#directory-count { background: #e9edf4; color: #71829b; font-size: 11px; border-radius: 5px; }
#directory-summary { font-size: 12px; margin: 5px 0 0; }
.processing-filter { gap: 8px; }
.processing-filter label { font-size: 11px; }
.processing-filter select { min-height: 40px; border-radius: 7px; font-size: 12px; max-width: 175px; }
.directory-search-wrap { max-width: none; margin: 0 0 22px; width: 100%; border: 1px solid #cbd5e3; box-shadow: none; border-radius: 9px; background: #fff; scroll-margin-top: 30px; }
.directory-search-wrap input { min-width: 0; height: 48px; font-size: 13px; padding: 12px 45px; }
.search-icon { left: 16px; }
.search-icon svg { width: 17px; height: 17px; }
.directory-search-wrap kbd { border-color: #e2e7ef; font-size: 11px; }
.tool-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.tool-card { padding: 20px; min-height: 216px; border-radius: 10px; box-shadow: none; border: 1px solid var(--line); }
.tool-card:hover { transform: none; border-color: #adc3e9; box-shadow: 0 3px 12px #244a9008; }
.card-top { gap: 8px; }
.tool-symbol { width: 32px; height: 32px; border-radius: 7px; background: #edf3ff; color: #486d9d; }
.tool-symbol svg { width: 18px; height: 18px; }
.card-category { font-size: 10px; color: #7d8aa0; }
.card-arrow svg { width: 14px; height: 14px; }
.tool-card h3 { font-size: 14px; line-height: 1.5; margin: 17px 0 6px; letter-spacing: -.015em; }
.tool-card p { font-size: 11px; line-height: 1.8; margin-bottom: 16px; }
.card-meta { margin-top: auto; padding-top: 12px; gap: 8px; flex-wrap: wrap; border-color: #edf0f5; }
.card-formats { font-size: 9px; line-height: 1.6; }
.processing-badge { font-size: 9px; line-height: 1.5; }
.directory-empty { margin: 20px 0; padding: 40px 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.directory-empty > svg { width: 28px; height: 28px; margin: 0 auto 15px; color: #7b91b2; }

.file-promise { border-top: 1px solid var(--line); padding: 34px 0; background: #edf2f8; }
.file-promise-grid { display: flex; align-items: center; gap: 24px; }
.promise-mark { display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0; border: 1px solid #d7e1ed; background: #f8faff; border-radius: 12px; color: #547398; }
.promise-mark svg { width: 28px; height: 28px; }
.file-promise h2 { font-size: 19px; margin: 0 0 4px; letter-spacing: -.025em; }
.file-promise p { font-size: 12px; color: var(--muted); margin: 0; max-width: 600px; }
.file-promise a { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 600; text-decoration: none; margin-left: auto; white-space: nowrap; }
.file-promise a svg { width: 15px; height: 15px; }
.category-intro { padding: 28px 0 38px; background: #fff; border-bottom: 1px solid var(--line); }
.category-intro-grid { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 70px; align-items: center; max-width: 980px; }
.category-intro h1 { font-size: clamp(29px,3.3vw,42px); line-height: 1.2; letter-spacing: -.045em; margin: 0 0 14px; }
.category-intro .eyebrow { margin-bottom: 10px; color: var(--accent); }
.category-intro p:not(.eyebrow) { color: var(--muted); font-size: 14px; max-width: 690px; margin: 0 0 16px; }

.category-guide { padding: 32px 0 36px; background: #fff; border: 0; }
.category-guide h2 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.03em; }
.category-workflow { max-width: 76ch; margin-top: 24px; }
.category-workflow p { color: var(--muted); line-height: 1.75; }
.category-guide-intro { max-width: 780px; font-size: 13px; line-height: 1.8; }
.choice-grid { gap: 26px; margin-top: 22px; }
.choice-grid article { border-top: 2px solid #dce7f7; padding-top: 14px; }
.choice-grid h3 { font-size: 14px; margin-bottom: 8px; }
.choice-grid p { font-size: 12px; }
.category-guide .container > h2:not(:first-child) { margin-top: 30px; }
.category-guide .container > p, .category-guide ol { font-size: 13px; color: var(--muted); }
.category-page .scenario-section { background: #f8fafd; border-top: 1px solid var(--line); padding: 28px 0; }
.category-page .scenario-links { grid-template-columns: repeat(3,minmax(0,1fr)); }
.page-hero, .tool-page .page-hero { padding: 28px 0 26px; background: var(--bg); border: 0; }
.page-hero h1, .tool-page .page-hero h1 { font-size: clamp(27px,3vw,36px); line-height: 1.25; letter-spacing: -.04em; max-width: 960px; margin: 0 0 12px; }
.page-hero p, .tool-page .page-hero p { max-width: 850px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.breadcrumb { gap: 8px; font-size: 11px; line-height: 1.6; margin-bottom: 21px; }
.breadcrumb a { min-height: 28px; display: inline-flex; align-items: center; color: #60738d; }
.tool-summary { font-size: 11px; margin-top: 14px; gap: 8px 20px; }
.tool-page .section { padding-block: 32px; }
.tool-page .article { max-width: var(--content); font-size: 13px; }
.tool-page .article h2 { font-size: 20px; letter-spacing: -.025em; }
.tool-page .article h3 { font-size: 15px; }
.tool-page .article > p { max-width: 880px; }
.tool-guide .container, #tool-guide .container { max-width: var(--content); }
#tool-guide { border-top: 1px solid var(--line); background: #fff; }
#tool-guide .guide-example { background: #f6f8fc; border: 1px solid var(--line); border-radius: 8px; }
.tool-details { margin-top: 24px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.tool-details summary { display: list-item; font-weight: 650; min-height: 28px; }
.faq-list details[open] > p, .tool-details[open] > p { margin-block: 8px 12px; overflow-wrap: anywhere; }
.tool-details p { color: var(--muted); line-height: 1.8; }
details { border-color: var(--line); }
summary { min-height: 42px; }
.info-page .page-hero { background: #fff; border-bottom: 1px solid var(--line); padding-bottom: 35px; }
.info-page .section { padding: 36px 0 60px; }
.info-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.info-block { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.info-block h2 { font-size: 18px; line-height: 1.4; letter-spacing: -.025em; margin: 0 0 12px; }
.info-block p { margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.9; }
.info-block a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.error-page { padding: 70px 0 90px; min-height: 55vh; }
.error-page .container { max-width: 800px; }
.error-code { display: inline-block; color: #6d86ab; font: 14px ui-monospace,monospace; padding: 9px 14px; border: 1px solid #d9e3f2; border-radius: 8px; background: #fff; }
.error-page h1 { font-size: 38px; margin: 20px 0 12px; letter-spacing: -.045em; }
.error-page p { max-width: 540px; color: var(--muted); font-size: 14px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.site-footer { background: #fff; padding: 0; border-top: 1px solid var(--line); }
.footer-main { display: flex; gap: 35px; align-items: center; justify-content: space-between; padding-top: 35px; padding-bottom: 27px; }
.footer-brand p { margin: 10px 0 0; font-size: 11px; color: #8390a3; }
.footer-main nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 12px; }
.footer-main nav a { text-decoration: none; color: #64748b; padding: 10px 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid #edf0f5; padding-top: 16px; padding-bottom: 18px; }
.footer-bottom p { font-size: 10px; color: #8994a5; margin: 0; }
@media (max-width: 1100px) {
  .header-inner { gap: 12px; } .nav a { padding: 8px 6px; font-size: 11px; }
.directory-layout { grid-template-columns: 160px minmax(0,1fr); gap: 24px; }
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

}
@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; padding-block: 14px; min-height: 70px; }
  .header-inner .header-search { margin-left: auto; order: 1; }
  .header-inner .language-switcher { order: 2; }
  .menu-toggle { display: grid; place-items: center; order: 3; width: 40px; height: 40px; padding: 9px; background: #fff; color: #496280; border: 1px solid var(--line); border-radius: 7px; }
  .menu-toggle svg { width: 20px; height: 20px; }
  .header-inner .nav { flex: 0 0 100%; order: 4; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; overflow: visible; }
  .nav a { font-size: 13px; padding: 11px; text-align: center; }
  .navigation-ready .nav:not(.is-open) { display: none; }

  .scenario-links, .category-page .scenario-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .container { padding-inline: 22px; }

  .section-topline { align-items: start; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .section-topline h2 { font-size: 22px; }
  .scenario-section { padding: 28px 0; }
  .directory-layout { display: block; }
  .directory-sidebar { position: static; margin-bottom: 22px; }
  .directory-sidebar .sidebar-label, .directory-note { display: none; }
  .category-nav { display: flex; flex-wrap: wrap; gap: 7px; overflow: visible; white-space: normal; padding: 0; margin: 0; }
  .category-link { padding: 8px 10px; min-height: 40px; background: #fff; border: 1px solid var(--line); gap: 7px; font-size: 11px; }
  .category-link .category-count { display: none; }
  .category-link.selected { border-color: #c7d7f4; }
  .category-link svg { width: 14px; height: 14px; }
  .directory-toolbar { align-items: start; gap: 12px; margin-bottom: 17px; }
  .directory-toolbar h2 { font-size: 21px; }
  .processing-filter { flex-direction: column; align-items: flex-start; gap: 4px; }
  .processing-filter select { min-height: 40px; padding: 7px 8px; max-width: 155px; }
  .directory-section { padding: 28px 0; }
  .file-promise-grid { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 14px; }
  .promise-mark { width: 40px; height: 44px; border-radius: 9px; }
  .promise-mark svg { width: 23px; height: 23px; }
  .file-promise h2 { font-size: 18px; }
  .file-promise a { grid-column: 2; margin: 0; }
  .category-intro-grid { grid-template-columns: 1fr; gap: 0; }

  .category-intro { padding: 22px 0 28px; }
  .category-guide { padding: 27px 0; }
  .choice-grid { gap: 21px; }
  .page-hero, .tool-page .page-hero { padding: 22px 0; }
  .page-hero p, .tool-page .page-hero p { font-size: 13px; }
  .breadcrumb { font-size: 10px; margin-bottom: 16px; }
  .tool-summary { font-size: 10px; }
  .info-layout { grid-template-columns: 1fr; }
  .info-block { padding: 22px; }
  .footer-main { align-items: start; flex-direction: column; gap: 16px; }
  .footer-main nav { gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 5px; }
}
@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .header-inner { gap: 7px; }
  .logo { font-size: 17px; gap: 7px; }
  .logo-mark { width: 32px; height: 32px; }
  .header-inner .header-search { padding: 9px; width: 36px; height: 40px; font-size: 12px; }
  .header-search span { display: none; }
  .menu-toggle { width: 36px; }

  .sample-file pre { font-size: 10px; padding: 13px; }

  .scenario-links, .category-page .scenario-links { grid-template-columns: 1fr; gap: 0; }
  .scenario-links > a { padding: 13px 0; }
  .scenario-links strong { font-size: 13px; }
  .scenario-links small { font-size: 11px; }
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { min-height: 0; padding: 18px; }
  .tool-card h3 { font-size: 15px; margin-top: 12px; }
  .tool-card p { font-size: 12px; margin-bottom: 15px; }
  .card-meta { flex-wrap: nowrap; }
  .card-formats, .processing-badge { font-size: 10px; }
  #directory-summary { font-size: 11px; }
  #directory-heading { font-size: 20px; }

  .directory-search-wrap input { font-size: 13px; height: 48px; }
  .category-intro h1 { font-size: 29px; }
  .error-page { padding: 40px 0 60px; }
  .error-page h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Illustrated tool directory and shared editorial navigation. */
.site-header { background: #fffefa; }
.nav a:hover, .nav a.active { background: #e4eee7; color: var(--accent); }
.atlas-hero { background: var(--forest); color: var(--on-forest); }
.atlas-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(26px,7vw,98px); align-items: center; padding-block: 40px; }
.atlas-copy h1 { font: 500 clamp(68px,6.4vw,96px)/.94 var(--display); letter-spacing: -.062em; margin: 0; }
.atlas-copy h1 em { display: block; font-weight: 400; color: #b3e1be; }
.atlas-copy > p { max-width: 430px; font-size: 16px; line-height: 1.58; margin: 20px 0; color: #e0e9de; }
.atlas-cta { display: inline-flex; align-items: center; gap: 25px; padding: 11px 17px; border-radius: 6px; color: #17382e; background: var(--leaf); text-decoration: none; font-weight: 700; }
.atlas-cta:hover { background: #e1f5cf; color: #17382e; }
.atlas-cta svg, .print-caption svg { width: 19px; height: 19px; }
.atlas-shortcuts { display: flex; flex-wrap: wrap; gap: 9px 19px; margin-top: 14px; }
.atlas-shortcuts a { color: #d6e4d7; text-underline-offset: 4px; font-size: 12px; }
.feature-print { width: 100%; max-width: 430px; justify-self: end; display: block; color: var(--text); text-decoration: none; background: #f9f5e9; border-radius: 9px; overflow: hidden; }
.tool-art { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; background: #f8efdc; }
.feature-print > img { height: auto; }
.print-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid #d7d8c6; }
.print-caption small, .card-category { font: 650 10px/1.5 ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .09em; }
.print-caption strong { display: block; font-size: 15px; }
.directory-section { padding: 24px 0 48px; }
.directory-layout { display: block; }
.directory-sidebar { margin: 0 0 24px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.category-nav { display: flex; flex-flow: row wrap; gap: 7px; }
.category-nav .category-link { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; background: #fffefa; border: 1px solid var(--line); border-radius: 30px; color: var(--text); gap: 8px; }
.category-nav .category-link.selected { background: #174e42; color: white; border-color: #174e42; }
.category-nav .category-link:hover:not(.selected) { background: #e5eee4; }
.category-count { font-variant-numeric: tabular-nums; }
.directory-toolbar { display: grid; grid-template-columns: 1fr minmax(235px, 35%) auto; gap: 20px; margin: 0 0 20px; }
.directory-toolbar .directory-search-wrap { margin: 0; border: 0; }
.directory-toolbar .search-icon { top: 50%; transform: translateY(-50%); display: flex; }
.directory-search-wrap input { border: 1px solid var(--line); border-radius: 7px; box-shadow: none; }
.directory-toolbar .processing-filter { display: grid; gap: 0; }
.processing-filter label { font-size: 10px; }
#directory-heading, .section-topline h2, .related-tools h2, .example-layout h2 { font: 600 clamp(27px,2.7vw,37px)/1.13 var(--display); letter-spacing: -.045em; margin: 0; }
#directory-count { color: #335c49; background: #e0eadd; }
.directory-results .tool-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.directory-results .tool-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; background: #fffefa; }
.directory-results .tool-card:hover { border-color: #63917c; box-shadow: 0 5px 18px #173e3311; }
.tool-card > .tool-art { border-bottom: 1px solid var(--line); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.card-copy .card-top { display: flex; align-items: center; }
.card-copy .card-category { display: inline; color: #48705b; }
.card-copy .card-arrow { display: inline-flex; margin-left: auto; color: var(--accent); }
.directory-results .tool-card h3 { font-size: 18px; line-height: 1.25; margin: 9px 0 6px; color: var(--text); }
.directory-results .tool-card p { color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.card-copy .card-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.card-meta .processing-badge { white-space: normal; }
.category-intro { background: #f2f2e9; border-bottom: 1px solid var(--line); }
.category-intro-grid, .tool-mast { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,22%); gap: 30px; align-items: center; max-width: var(--content); }
.category-intro-grid > img, .tool-mast > img { max-height: 155px; object-fit: contain; border: 1px solid #d8d9c9; border-radius: 7px; }
.tool-page .page-hero h1, .category-intro h1, .info-page h1 { font-family: var(--display); font-weight: 600; }
/* A tool opens on the same illustrated cover as the directory. */
.tool-page .page-hero { background: var(--forest); color: var(--on-forest); padding: 25px 0; }
.tool-mast { grid-template-columns: minmax(0,1fr) minmax(150px,25%); gap: clamp(22px,5vw,76px); }
.tool-mast > img { max-width: 285px; max-height: none; justify-self: end; border: 0; border-radius: 7px; }
.tool-page .page-hero h1 { max-width: 23ch; color: inherit; font-size: clamp(34px,3.7vw,56px); line-height: 1.04; }
.tool-page .tool-mast p { max-width: 70ch; font-size: 15px; line-height: 1.6; color: #e0e9de; }
.tool-mast .breadcrumb, .tool-mast .breadcrumb a { color: #c1d7c8; }
.tool-mast .breadcrumb [aria-current], .tool-mast .tool-summary { color: #dfecdb; }
.tool-mast .tool-summary strong, .tool-mast .tool-summary a { color: var(--leaf); }
.tool-mast .tool-summary { align-items: center; }
.tool-mast .tool-summary > span { border: 1px solid #547368; padding: 3px 9px; border-radius: 4px; }

.tool-mast .breadcrumb { margin-bottom: 10px; }
.guide-container .article { max-width: 880px; }
.example-band, .related-tools { padding: 36px 0; border-top: 1px solid var(--line); background: #f4f4eb; }
.example-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; align-items: center; }
.example-layout p { color: var(--muted); }
.example-files { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; align-items: stretch; }
.example-files .sample-conversion { display: none; }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.related-grid a { display: flex; align-items: center; gap: 12px; padding: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; text-decoration: none; }
.related-grid a:hover { border-color: var(--accent); }
.related-grid img { width: 70px; border-radius: 3px; }
.related-grid strong, .related-grid small { display: block; }
.related-grid strong { font-size: 14px; line-height: 1.35; }
.related-grid small { font-size: 10px; color: var(--muted); }
.related-grid svg { width: 16px; height: 16px; margin: 0 5px 0 auto; }
.site-footer { background: #163a32; color: #f7f6e9; }
.site-footer .logo-mark { color: #faf4df; }
.site-footer .logo, .site-footer .logo em, .footer-main nav a, .footer-group a { color: inherit; }
.footer-brand p, .footer-bottom p { color: #c1d2c8; }
.footer-tools { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 20px; padding-block: 18px 24px; }
.footer-group h2 { margin: 0 0 5px; font-size: 15px; }
.footer-group a { text-decoration: none; }
.footer-group > a { display: block; width: fit-content; max-width: 100%; padding: 5px 0; font-size: 12px; line-height: 1.5; color: #d1dfd3; overflow-wrap: anywhere; }
.site-footer a:hover { color: #c1eab5; text-decoration: underline; }
.footer-bottom { border-color: #396054; }
@media (max-width: 1050px) {
  .directory-results .tool-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-tools { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .atlas-hero-grid { gap: 20px; padding-block: 25px; }
  .atlas-copy h1 { font-size: clamp(43px,8vw,62px); }
  .atlas-copy > p { font-size: 14px; margin: 13px 0; }
  .directory-results .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .directory-toolbar { grid-template-columns: 1fr auto; gap: 10px; }
  .directory-toolbar .directory-search-wrap { grid-column: 1 / -1; grid-row: 2; }
  .category-nav { margin: 0; padding: 0; }
  .example-layout { grid-template-columns: 1fr; }
  .tool-mast, .category-intro-grid { gap: 14px; grid-template-columns: minmax(0,1fr) 125px; }
}
@media (max-width: 540px) {
  .atlas-hero-grid { grid-template-columns: 1fr; gap: 17px; }
  .atlas-copy h1 { font-size: clamp(36px,10vw,54px); }
  .atlas-copy h1 em { display: inline; }
  .atlas-shortcuts { display: none; }
  .feature-print { max-width: none; display: grid; grid-template-columns: 41% 1fr; }
  .feature-print > img { height: 100%; aspect-ratio: 3/2; object-fit: cover; }
  .print-caption { padding: 9px 12px; border: 0; }
  .print-caption strong { font-size: 14px; line-height: 1.25; }
  .category-nav { gap: 5px; }
  .category-nav .category-link { min-height: 34px; gap: 5px; padding: 6px 9px; }
  .directory-results .tool-grid { grid-template-columns: 1fr; }
  .directory-results .tool-card { display: grid; grid-template-columns: minmax(90px,32%) minmax(0,1fr); }
  .tool-card > .tool-art { align-self: stretch; height: 100%; border: 0; object-fit: contain; }
  .card-copy { padding: 12px; }
  .directory-results .tool-card h3 { font-size: 17px; margin: 5px 0; }
  .card-copy .card-meta { padding-top: 6px; }
  .directory-results .tool-card p { margin-bottom: 8px; }
  .category-intro-grid, .tool-mast { grid-template-columns: minmax(0,1fr) 80px; gap: 8px 12px; }
  .tool-mast > div, .category-intro-grid > div { display: contents; }
  .tool-mast .breadcrumb, .tool-mast p, .tool-mast .tool-summary,
  .category-intro-grid p, .category-intro-grid .text-link { grid-column: 1 / -1; margin-block: 0; }
  .tool-mast > img, .category-intro-grid > img { grid-column: 2; grid-row: 2; width: 80px; }
  .tool-mast { grid-template-columns: minmax(0,1fr) 92px; }
  .tool-mast > img { width: 92px; }
  .tool-page .tool-mast h1 { font-size: 29px; }
  .tool-page .tool-mast p { font-size: 14px; }
  .tool-mast h1, .category-intro-grid h1 { grid-row: 2; margin: 0; }
  .example-files, .related-grid { grid-template-columns: 1fr; }
  .footer-tools { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
}

/* Tool instructions follow the same paper-and-ink hierarchy as the work area. */
.tool-page .guide-container .article { max-width: none; }
.tool-page #tool-guide { background: transparent; border-top: 2px solid var(--forest); padding: 24px 0; }
.tool-page .article h2 { color: var(--ink); font: 600 clamp(24px, 3vw, 36px)/1.15 var(--display); letter-spacing: -.035em; }
.tool-page .article :is(p, li) { color: var(--muted); }
.guide-spread { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: clamp(20px,4vw,60px); align-items: start; margin: 22px 0; }
.tool-page .guide-steps { margin: 0; padding-left: 24px; }
.guide-steps li { padding: 6px 0 9px 3px; }
.guide-steps li::marker { color: var(--accent); font-weight: 700; }
.guide-reference { padding: 18px 22px; background: var(--linen); border-left: 3px solid var(--accent); }
.guide-reference h3 { margin-top: 0; }
#tool-guide .guide-example { background: transparent; border: 0; padding: 0; line-height: 1.7; }
.guide-reference p:last-child { margin-bottom: 0; }
.tool-page .faq-list details, .tool-page .tool-details { background: var(--sheet); border-color: var(--line); }
.tool-page .article code, .tool-page .article .callout { background: var(--mint); color: var(--ink); }
@media (max-width: 800px) { .guide-spread { grid-template-columns: 1fr; } }

/* Editorial pages share the site's book typography and paper colors. */
.guide-index, .guide-article > article { padding-block: clamp(24px, 4vw, 64px); }
.guide-article > article, .guide-article .related-guides .container { max-width: 820px; }
.guide-index header, .guide-article article > header { max-width: 76ch; margin-bottom: 24px; }
.guide-index h1, .guide-article h1 {
  font: 600 clamp(2.05rem, 4vw, 3.35rem)/1.07 var(--display);
  letter-spacing: -.032em; margin: 12px 0;
}
.guide-index header p, .guide-article header p { font-size: 1.1rem; color: var(--muted); }
.guide-index section { margin-block: 2.5rem; }
.guide-index h2, .guide-actions h2, .guide-prose h2, .related-guides h2 {
  font: 600 clamp(1.45rem, 3vw, 2rem)/1.18 var(--display); margin-bottom: .8rem;
}
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 14px; }
.guide-card, .guide-tool { padding: 20px; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; }
.guide-card { display: flex; flex-direction: column; align-items: flex-start; }
.guide-card h3 { font: 600 1.4rem/1.25 var(--display); margin: 8px 0; }
.guide-card p { margin: 0 0 16px; color: var(--muted); }
.guide-card > a { margin-top: auto; }
.guide-tool { display: grid; gap: 6px; align-content: start; text-decoration: none; }
.guide-tool span, .guide-card > a, .related-guides a { color: var(--accent); text-decoration: underline; text-underline-offset: .16em; }
.guide-tool small, .guide-card small { color: var(--muted); }
.guide-notice { padding: 12px 16px; background: var(--mint); border-left: 3px solid var(--accent); font-size: .9rem; }
.guide-prose { margin: 2rem 0; font: 1.1rem/1.72 var(--display); overflow-wrap: break-word; }
.guide-prose p { margin: 1em 0; }
.guide-prose h2 { margin-top: 1.6em; }
.guide-prose a { color: var(--accent); text-decoration: underline; }
.guide-prose pre, .guide-table-wrap { max-width: 100%; overflow-x: auto; margin-block: 1.25rem; }
.guide-prose pre { padding: 16px; background: var(--forest); color: var(--on-forest); border-radius: 8px; font: .86rem/1.65 ui-monospace, monospace; }
.guide-table-wrap { border: 1px solid var(--rule); border-radius: 8px; }
.guide-table-wrap table { width: 100%; min-width: 32rem; border-collapse: collapse; font: .93rem/1.5 system-ui, sans-serif; }
.guide-table-wrap th, .guide-table-wrap td { padding: 10px 12px; text-align: left; vertical-align: top; }
.guide-table-wrap th { background: var(--mint); }
.guide-table-wrap tr + tr { border-top: 1px solid var(--line); }
.related-guides { border-top: 1px solid var(--line); padding-block: 28px; }
.related-guides h2, .related-guides ul { margin: 0 0 10px; }
.related-guides ul { padding-left: 1.3em; }
.related-guides li + li { margin-top: .35em; }

.featured-guides { padding-block: clamp(28px, 4vw, 56px); }
.featured-guides .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.featured-guides .guide-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr auto; align-items: baseline; }
.featured-guides .guide-card > :is(h3, p, a) { grid-column: 1 / -1; }
.guide-category { justify-self: start; padding: .2em .65em; border-radius: 1em; background: var(--mint); color: var(--forest); font-size: .8rem; font-weight: 650; }
.editorial-method { padding-block: clamp(24px, 3vw, 44px); background: var(--linen); }
.editorial-method .container > div { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(20px, 4vw, 64px); }
.editorial-method p { max-width: 65ch; line-height: 1.7; }
.guide-byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.1rem; color: var(--muted); font-size: .9rem; }
.guide-byline a { color: var(--forest); font-weight: 650; }
.guide-figure { margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.guide-figure img { display: block; width: 100%; height: auto; }
.guide-figure figcaption { padding: .65rem 1rem; font: .92rem/1.5 system-ui, sans-serif; }
.guide-references { padding-top: .5rem; border-top: 1px solid var(--rule); }
.guide-references li + li { margin-top: .45rem; }
@media (max-width: 980px) {
  .featured-guides .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #site-navigation a:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .featured-guides .guide-grid, .editorial-method .container > div { grid-template-columns: 1fr; }
}
