/* Canonical Doodling AM UI palette and shell. Artwork colors are owned by each tool. */
  /* Fraunces (display) and Source Sans 3 (text), both SIL OFL, cut to Latin. */
  @font-face { font-family: "Fraunces"; src: url(/site/fonts/fraunces-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
  @font-face { font-family: "Fraunces"; src: url(/site/fonts/fraunces-italic-560.woff2) format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
  @font-face { font-family: "Source Sans 3"; src: url(/site/fonts/source-sans-3-normal-400-700.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
  :root {
    --paper: #f4eddc; --card: #fbf7ec; --card-2: #f3ead7; --ink: #3b2a1e; --ink-2: #6a5847; --line: rgba(80, 58, 32, 0.14); --line-2: rgba(80, 58, 32, 0.28);
    --vermilion: #b74722; --vermilion-dark: #8e2f18; --green: #1c3a28;
    --scheme: light; --footer: #ece3d0; --cta-bg: #b74722; --cta-hover: #a8401d; --cta-ink: #fbf3e4;
    --focus: #8e351b; --gutter: clamp(20px, 3.2vw, 64px);
    --display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --text: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  :root[data-theme="dark"] {
    --paper: #221e1a; --card: #2e2822; --card-2: #3b322a; --ink: #f5ebdc; --ink-2: #cabead; --line: rgba(240, 219, 189, 0.2); --line-2: rgba(240, 219, 189, 0.36);
    --vermilion: #f0a17e; --vermilion-dark: #f6b392; --green: #b9d0b9; --scheme: dark; --footer: #1c1916;
    --cta-bg: #f0a17e; --cta-hover: #f6b99e; --cta-ink: #302019; --focus: #f5bb9c;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
      --paper: #221e1a; --card: #2e2822; --card-2: #3b322a; --ink: #f5ebdc; --ink-2: #cabead; --line: rgba(240, 219, 189, 0.2); --line-2: rgba(240, 219, 189, 0.36);
      --vermilion: #f0a17e; --vermilion-dark: #f6b392; --green: #b9d0b9; --scheme: dark; --footer: #1c1916;
      --cta-bg: #f0a17e; --cta-hover: #f6b99e; --cta-ink: #302019; --focus: #f5bb9c;
    }
  }
  .site-header { font: 400 16px/1.4 var(--text); position: sticky; top: 0; z-index: 20; width: 100%; padding: 10px var(--gutter); background: var(--paper); }
  .site-header .bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; }
  .site-header .header-start { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 40px); }
  .site-header .header-nav { display: flex; align-items: center; gap: 4px; }
  .site-header .header-actions { display: flex; align-items: center; gap: 20px; }
  .site-header .header-link { margin: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 16px; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background-color .15s ease-out, color .15s ease-out; }
  .site-header .header-cta { margin: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 12px; background: var(--cta-bg); color: var(--cta-ink); font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; white-space: nowrap; transition: background .15s ease-out, transform .15s ease-out; }
  .site-header .header-cta:hover { background: var(--cta-hover); color: var(--cta-ink); }
  .site-header .header-cta:active { transform: translateY(1px); }
  .site-header .mark { padding: 0; margin: 0; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 44px; min-height: 44px; color: var(--ink); text-decoration: none; }
  .site-header .mark .brand-symbol { --accent: var(--vermilion); width: 40px; height: 40px; display: block; flex: none; }
  .site-header .mark .brand-wordmark { height: 28px; width: auto; display: block; }
  .theme-picker { margin: 0; border: 0; padding: 0; position: relative; }
  .theme-picker summary { margin: 0; padding: 0; border: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); cursor: pointer; list-style: none; transition: background .15s ease-out, color .15s ease-out; }
  .theme-picker summary::-webkit-details-marker { display: none; }
  .theme-picker summary:hover, .theme-picker[open] summary { color: var(--ink); background: var(--card); }
  .theme-picker svg { grid-area: 1 / 1; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .theme-picker summary .theme-moon, [data-theme="dark"] .theme-picker summary .theme-sun { display: none; }
  [data-theme="dark"] .theme-picker summary .theme-moon { display: block; }
  .theme-options { z-index: 30; font: 400 16px/1.4 var(--text); position: absolute; top: calc(100% + 12px); right: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 264px; min-inline-size: 0; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  .theme-label { font-size: 15px; font-weight: 600; }
  .theme-segments { --theme-index: 0; position: relative; display: flex; flex-shrink: 0; padding: 3px; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); }
  [data-theme-choice="light"] .theme-segments { --theme-index: 1; }
  [data-theme-choice="dark"] .theme-segments { --theme-index: 2; }
  .theme-segments::before { content: ""; position: absolute; top: 3px; left: 3px; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); transform: translateX(calc(var(--theme-index) * 44px)); transition: transform 280ms cubic-bezier(.16, 1, .3, 1); }
  .theme-segments label { display: block; margin: 0; padding: 0; position: relative; width: 44px; height: 44px; color: var(--ink-2); cursor: pointer; border-radius: 50%; }
  .theme-segments input { position: absolute; inset: 0; z-index: 1; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
  .theme-option-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: color 150ms ease-out, background-color 150ms ease-out; }
  .theme-segments label:hover .theme-option-icon { color: var(--ink); background: var(--line); }
  .theme-segments input:checked + .theme-option-icon { color: var(--paper); background: transparent; }
  .theme-segments input:focus-visible + .theme-option-icon { outline: 2px solid var(--focus); outline-offset: 3px; }
  .theme-options svg { width: 19px; height: 19px; }

  /* A brief change of lighting keeps the page and its controls live throughout. */
  @property --paper { syntax: "<color>"; inherits: true; initial-value: #f4eddc; }
  @property --card { syntax: "<color>"; inherits: true; initial-value: #fbf7ec; }
  @property --ink { syntax: "<color>"; inherits: true; initial-value: #3b2a1e; }
  @property --ink-2 { syntax: "<color>"; inherits: true; initial-value: #6a5847; }
  @property --line { syntax: "<color>"; inherits: true; initial-value: rgba(80, 58, 32, 0.14); }
  @property --vermilion { syntax: "<color>"; inherits: true; initial-value: #b74722; }
  @property --green { syntax: "<color>"; inherits: true; initial-value: #1c3a28; }
  @property --footer { syntax: "<color>"; inherits: true; initial-value: #ece3d0; }
  @property --cta-bg { syntax: "<color>"; inherits: true; initial-value: #b74722; }
  @property --cta-hover { syntax: "<color>"; inherits: true; initial-value: #a8401d; }
  @property --cta-ink { syntax: "<color>"; inherits: true; initial-value: #fbf3e4; }
  @property --focus { syntax: "<color>"; inherits: true; initial-value: #8e351b; }
  @property --card-2 { syntax: "<color>"; inherits: true; initial-value: #f3ead7; }
  @property --line-2 { syntax: "<color>"; inherits: true; initial-value: rgba(80, 58, 32, 0.28); }
  @property --vermilion-dark { syntax: "<color>"; inherits: true; initial-value: #8e2f18; }
  :root[data-theme-turn] { transition: --vermilion-dark 260ms ease-out, --line-2 260ms ease-out, --card-2 260ms ease-out, --paper 260ms ease-out, --card 260ms ease-out, --ink 260ms ease-out, --ink-2 260ms ease-out, --line 260ms ease-out, --vermilion 260ms ease-out, --green 260ms ease-out, --footer 260ms ease-out, --cta-bg 260ms ease-out, --cta-hover 260ms ease-out, --cta-ink 260ms ease-out, --focus 260ms ease-out; }

  .site-footer { box-sizing: border-box; width: 100%; margin: 0; padding: clamp(48px, 5vw, 64px) var(--gutter) 16px; border: 0; background: var(--footer); color: var(--ink-2); font: 400 16px/1.5 var(--text); text-align: left; }
  .site-footer * { box-sizing: border-box; }
  .site-footer p { margin: 0; }
  .site-footer a { color: inherit; text-decoration: none; }
  .site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .site-footer a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
  .site-footer .footer-top { display: grid; gap: 40px; }
  .site-footer .footer-line { font: 600 clamp(26px, 2.4vw, 32px)/1.15 var(--display); letter-spacing: -0.015em; color: var(--ink); }
  .site-footer .footer-note { margin-top: 12px; }
  .site-footer .footer-share { display: inline-flex; align-items: center; min-height: 44px; margin-top: 22px; padding: 0 20px; border-radius: 12px; background: var(--cta-bg); color: var(--cta-ink); font-weight: 600; transition: background-color .15s ease-out; }
  .site-footer .footer-share:hover { background: var(--cta-hover); color: var(--cta-ink); text-decoration: none; }
  .site-footer .footer-status { min-height: 1.5em; margin-top: 10px; font-size: 14px; }
  .site-footer .footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 32px; }
  .site-footer .footer-label { margin-bottom: 4px; font-weight: 600; color: var(--ink); }
  .site-footer .footer-links ul { margin: 0; padding: 0; list-style: none; }
  .site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 36px; }
  .site-footer .footer-end { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin-top: 32px; font-size: 14px; }
  .site-footer .footer-end a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer.footer-slim { padding-block: 8px; }
  .site-footer.footer-slim .footer-end { margin-top: 0; }
  @media (min-width: 1000px) {
    .site-footer .footer-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 6vw, 112px); }
  }


/* Shared appearance controls own their sizing even inside an application's UI. */
html { color-scheme: var(--scheme); background-color: var(--paper); scroll-padding-top: 88px; }
.site-header, .site-header *, .theme-picker, .theme-picker *, .theme-picker *::before { box-sizing: border-box; }
.site-header :is(a, summary):focus-visible, .theme-picker input:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 3px; }
.theme-picker .vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.theme-picker[hidden] { display: none !important; }
.site-header .header-link:hover { color: var(--ink); background: var(--card); }
.site-header .header-link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.theme-picker[data-theme-inline] { position: static; width: 100%; }
.theme-picker[data-theme-inline] > summary { display: none; }
.theme-picker[data-theme-inline] .theme-options { position: static; width: 100%; border: 0; border-radius: 0; padding: 8px; background: transparent; }
@media (min-width: 1600px) and (min-height: 1000px) {
  .site-header .mark .brand-wordmark { height: 32px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .site-header .bar { gap: 12px; }
  .site-header .header-actions { gap: 8px; }
  .site-header .header-nav, .site-header .header-link { display: none; }
  .site-header .header-cta { padding: 10px 14px; font-size: 15px; }
  .site-header .mark .brand-wordmark { display: none; }
  .theme-picker { position: static; }
  .theme-options { right: var(--gutter); }
}
@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .site-header .bar { gap: 6px; }
  .site-header .header-actions { gap: 4px; }
  .site-header .header-cta { padding-inline: 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .header-cta, .site-header .header-link, .site-footer .footer-share, .theme-picker summary, .theme-segments::before, .theme-option-icon { transition: none; }
  :root[data-theme-turn] { transition: none; }
}

/* Logo motion (appearance.js): presses land on the link itself, never on a part that moves or swaps.
   The motion is the logo's tap feedback, so no tap highlight box covers it on phones. */
.site-header .mark svg, .site-header .mark .logo-stack { pointer-events: none; }
.site-header a.mark { -webkit-tap-highlight-color: transparent; }
