/* Shared colors keep text, controls and focus states consistent in both themes. */
:root {
  --text: #292b26;
  --page: #f7f6f2;
  --line: #deded5;
  --muted: #73766c;
  --highlight: #b75032;
  --surface: #fbfaf7;
  --icon-surface: #ffffff60;
  --hover-surface: #ffffff80;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 48px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 112px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; font-size: 11px; font-weight: 650; letter-spacing: 1.6px; }
.monogram { display: grid; place-items: center; width: 39px; height: 39px; background: #bf4b2c; color: #fffaf0; border-radius: 12px; font: italic 30px Georgia, serif; letter-spacing: -2px; padding-right: 4px; padding-bottom: 3px; }
.header-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; background: #788b65; border-radius: 50%; }
.intro { padding: 70px 0 56px; }
.eyebrow { margin: 0 0 19px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 2px; }
h1 { margin: 0; font-weight: 450; font-size: clamp(42px, 5.5vw, 66px); letter-spacing: -3px; line-height: 1.12; }
h1 em { font-family: Georgia, "Times New Roman", serif; color: var(--highlight); font-weight: 400; }
.intro-text { margin: 21px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 600; }
.count { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: var(--muted); font: 10px ui-monospace, monospace; }
.search { display: flex; align-items: center; gap: 9px; width: 240px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.search svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.search input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; outline: none; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--highlight); outline-offset: 3px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tile { display: flex; min-height: 228px; flex-direction: column; justify-content: space-between; gap: 40px; padding: 26px 28px; border: 1px solid var(--border); border-radius: 16px; background: var(--background); text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease; }
.tile-map { --background: #eaf0e5; --border: #dce3d5; --accent: #53694b; }
.tile-bakery { --background: #f4eadd; --border: #e8dccc; --accent: #986233; }
.tile-cookbook { --background: #e8edf0; --border: #d8e1e7; --accent: #526e82; }
.tile-croissants { --background: #f4e6e0; --border: #e9d8d0; --accent: #a06148; }
.tile-top, .tile-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--border); background: var(--icon-surface); border-radius: 14px; color: var(--accent); }
.tile-icon svg { width: 29px; height: 29px; }
.open-arrow { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--accent); transition: background 180ms ease, transform 180ms ease; }
.open-arrow svg { width: 19px; height: 19px; }
.tile h3 { margin: 0 0 9px; font-size: 23px; font-weight: 500; letter-spacing: -.7px; }
.tile p { margin: 0; font-size: 11px; color: var(--accent); overflow-wrap: anywhere; }
.tile-number { align-self: flex-end; color: var(--accent); font: 10px ui-monospace, monospace; opacity: .8; }
.tile:focus-visible, .brand:focus-visible { outline: 2px solid var(--highlight); outline-offset: 5px; }
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px); box-shadow: 0 10px 20px #3438290c; }
  .tile:hover .open-arrow { background: var(--hover-surface); transform: translate(2px, -2px); }
}
.link-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 24px 0 0; color: var(--muted); font-size: 10px; }
.link-note svg { width: 12px; height: 12px; }
.empty-state { padding: 60px 20px; margin: 0; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; font-size: 14px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 62px; padding: 25px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
footer > span:last-child { display: flex; align-items: center; gap: 10px; }
.footer-star { color: var(--highlight); font-size: 20px; }
.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; }
[hidden] { display: none !important; }
@media (min-width: 1500px) { .page { padding-top: 30px; } }
@media (max-width: 640px) {
  .page { padding: 0 22px; }
  .site-header { min-height: 86px; }
  .header-note { display: none; }
  .intro { padding: 48px 0 36px; }
  h1 { letter-spacing: -2px; }
  .intro-text { font-size: 13px; max-width: 270px; }
  .toolbar { flex-wrap: wrap; gap: 16px; }
  .search { width: 100%; }
  .search input { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .tile { min-height: 210px; padding: 23px; }
  footer { margin-top: 42px; align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #e8e7e3;
  --page: #1d1e20;
  --line: #3b3d40;
  --muted: #acafa8;
  --highlight: #e49777;
  --surface: #27282b;
  --icon-surface: #ffffff08;
  --hover-surface: #ffffff12;
}
[data-theme="dark"] .tile-map { --background: #282f29; --border: #3b483b; --accent: #b0c5a6; }
[data-theme="dark"] .tile-bakery { --background: #332d26; --border: #4c4032; --accent: #d6b58d; }
[data-theme="dark"] .tile-cookbook { --background: #272e35; --border: #394753; --accent: #abc1d3; }
[data-theme="dark"] .tile-croissants { --background: #352b29; --border: #503c36; --accent: #dcae99; }
.brand-group { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 11px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.theme-toggle:hover { background: var(--line); }
.theme-toggle:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle .sun-icon, [data-theme="dark"] .theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
@media (max-width: 640px) { .brand-group { flex: 1; justify-content: space-between; gap: 8px; } }
