/* These design studies are isolated from the live site's styles. */
.style-preview { background: #f4f4f2; color: #292c2c; font-family: system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.style-preview *, .style-preview *::before, .style-preview *::after { box-sizing: border-box; }
.style-preview a { text-underline-offset: 4px; }
.style-preview a:focus-visible, .style-preview button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.style-preview__toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 32px; background: #fff; border-bottom: 1px solid #dedfdd; }
.style-preview__back, .style-preview__current { color: #616662; font-size: 12px; text-decoration: none; }
.style-preview__back:hover, .style-preview__current:hover { color: #202624; text-decoration: underline; }
.style-preview__switcher { display: flex; flex-wrap: wrap; gap: 4px; }
.style-preview__option { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 6px; color: #5e625f; text-decoration: none; font-size: 12px; font-weight: 600; }
.style-preview__option:hover { background: #f5f5f3; }
.style-preview__option[aria-current] { background: #ededeb; color: #202624; }
.style-preview__dot { width: 10px; height: 10px; border: 1px solid #cdd2d4; border-radius: 50%; }
.style-preview__dot--clean { background: #f7faff; }
.style-preview__dot--paper { background: #d9ddc9; border-color: #b1b7a1; }
.style-preview__dot--charcoal { background: #293332; border-color: #293332; }

.style-gallery { min-height: calc(100svh - 68px); max-width: 1500px; margin: auto; padding: 68px 40px 32px; }
.style-gallery__intro { margin-bottom: 42px; }
.style-gallery__eyebrow { margin: 0 0 16px; color: #666c67; font-size: 10px; font-weight: 650; letter-spacing: .15em; }
.style-gallery__intro h1 { margin: 0 0 14px; font-size: clamp(28px, 3vw, 42px); font-weight: 550; letter-spacing: -.045em; }
.style-gallery__intro > p:last-child { margin: 0; color: #6c706c; font-size: 14px; line-height: 1.6; }
.style-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.style-gallery__card { min-width: 0; overflow: hidden; border: 1px solid #dcded9; border-radius: 10px; background: #fff; }
.style-gallery__mini { height: 320px; overflow: hidden; border-bottom: 1px solid #dcded9; user-select: none; }
.style-gallery__mini .style-demo { zoom: .4; min-height: 800px; }
.style-gallery__details { padding: 24px; }
.style-gallery__number { float: right; margin-top: 5px; color: #838883; font-size: 11px; font-variant-numeric: tabular-nums; }
.style-gallery__details h2 { margin: 0 0 10px; font-size: 21px; font-weight: 550; letter-spacing: -.025em; }
.style-gallery__details p { max-width: 30ch; min-height: 42px; margin: 0 0 24px; font-size: 13px; line-height: 1.65; color: #666c67; }
.style-gallery__open { display: flex; align-items: center; justify-content: space-between; padding-top: 15px; border-top: 1px solid #e8e9e5; color: #303832; font-size: 12px; font-weight: 600; text-decoration: none; }
.style-gallery__open:hover { color: #28594c; }
.style-gallery__open span { font-size: 18px; }
.style-gallery__note { margin: 28px 0 0; color: #6c706c; font-size: 11px; }

.style-demo {
  --canvas: #fff;
  --surface: #fff;
  --ink: #202d42;
  --muted: #6b7585;
  --line: #e0e6ed;
  --accent: #315a9d;
  --tint: #f2f6fc;
  --button-text: #fff;
  --radius: 14px;
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
}
.style-demo--paper { --canvas: #f6f3eb; --surface: #fcfbf7; --ink: #293c32; --muted: #6b7266; --line: #d9dccf; --accent: #345743; --tint: #eaeddf; --radius: 4px; }
.style-demo--charcoal { --canvas: #191e20; --surface: #21282b; --ink: #e9efec; --muted: #a0ada9; --line: #384245; --accent: #b6dac8; --tint: #2b3935; --button-text: #1b3027; --radius: 8px; color-scheme: dark; }
.style-demo__header { display: flex; align-items: center; gap: 48px; padding: 23px 5%; border-bottom: 1px solid var(--line); }
.style-demo__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 14px; font-weight: 650; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.style-demo__mark { display: flex; align-items: center; justify-content: center; gap: 1px; width: 37px; height: 37px; border-radius: 9px; background: var(--accent); color: var(--button-text); font-size: 18px; font-weight: 600; letter-spacing: -.1em; }
.style-demo__mark span { align-self: flex-start; margin-top: 7px; font-size: 11px; letter-spacing: 0; }
.style-demo__nav { display: flex; align-items: center; gap: 27px; }
.style-demo__nav a { padding: 8px 0; color: var(--muted); text-decoration: none; font-size: 12px; }
.style-demo__nav a[aria-current] { color: var(--ink); }
.style-demo__nav a:hover { color: var(--accent); text-decoration: underline; }
.style-demo__header > .user-menu { margin-left: auto; }
.style-demo .user-menu__sign-in { padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 12px; font-weight: 500; }
.style-demo .user-menu__sign-in:hover { background: var(--tint); border-color: var(--accent); }
.style-demo .user-menu__button { border-color: var(--line); color: var(--ink); background: var(--surface); }
.style-demo .user-menu__panel { background: var(--surface); border-color: var(--line); }
.style-demo .user-menu__email { color: var(--ink); }
.style-demo .user-menu__label, .style-demo .user-menu__sign-out { color: var(--muted); }
.style-demo .user-menu__sign-out { border-color: var(--line); }
.style-demo .user-menu__admin { color: var(--accent); border-color: var(--accent); }
.style-demo .user-menu__admin:hover { background: var(--accent); color: var(--button-text); }
.style-demo__main { width: min(720px, 90%); margin: 0 auto; padding: clamp(52px, 8vh, 90px) 0 56px; }
.style-demo__intro { text-align: center; }
.style-demo__eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 22px; color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.style-demo__eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.style-demo__intro h1 { margin: 0; font-size: clamp(38px, 4.5vw, 58px); font-weight: 500; line-height: 1.1; letter-spacing: -.06em; }
.style-demo__lede { margin: 20px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.style-demo__search { position: relative; }
.style-demo__composer { padding: 22px 22px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 24px #182d4810; }
.style-demo__composer:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 3px; }
.style-demo__field { display: flex; align-items: flex-start; gap: 12px; }
.style-demo__field > svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; color: var(--muted); }
.style-demo__field textarea { width: 100%; min-height: 66px; padding: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; }
.style-demo__field textarea::placeholder { color: var(--muted); opacity: 1; }
.style-demo__search-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.style-demo__search-foot > span { color: var(--muted); font-size: 11px; line-height: 1.8; }
.style-demo__search-foot kbd { font-family: inherit; font-size: 13px; }
.style-demo__search-foot > span > span { margin: 0 5px; }
.style-demo__send { flex: 0 0 36px; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: calc(var(--radius) - 1px); background: var(--accent); color: var(--button-text); cursor: pointer; }
.style-demo__send:hover { filter: brightness(.9); }
.style-demo__send svg { width: 20px; height: 20px; }
.style-demo__results { position: absolute; z-index: 5; width: 100%; max-height: 340px; margin-top: 9px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 30px #0002; }
.style-demo .search-result { color: var(--ink); }
.style-demo .search-result:hover, .style-demo .search-result:focus-visible { background: var(--tint); }
.style-demo .search-result:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.style-demo .search-result__snippet, .style-demo .search-result__source, .style-demo .search-results__status { color: var(--muted); }
.style-demo__forms { margin-top: 38px; }
.style-demo__section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.style-demo__section-head h2 { margin: 0; font-size: 12px; font-weight: 600; }
.style-demo__section-head > a { color: var(--muted); font-size: 11px; text-decoration: none; }
.style-demo__section-head > a:hover { color: var(--accent); text-decoration: underline; }
.style-demo__form-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.style-demo__form { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.style-demo__form:hover { border-color: var(--accent); background: var(--tint); }
.style-demo__form-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 40px; border-radius: 6px; background: var(--tint); color: var(--accent); }
.style-demo__form-icon svg { width: 21px; height: 21px; }
.style-demo__form-body { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.style-demo__form-body strong { font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.style-demo__form-body > span { color: var(--muted); font-size: 10px; }
.style-demo__form-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }
.style-demo__footer { display: flex; justify-content: space-between; gap: 20px; margin: auto 5% 0; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

/* Paper has a left-aligned, editorial rhythm and simple ruled form rows. */
.style-demo--paper .style-demo__mark { border-radius: 2px; }
.style-demo--paper .style-demo__main { width: min(780px, 90%); }
.style-demo--paper .style-demo__intro { text-align: left; }
.style-demo--paper .style-demo__eyebrow { justify-content: flex-start; }
.style-demo--paper .style-demo__intro h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5vw, 64px); font-weight: 400; letter-spacing: -.05em; }
.style-demo--paper .style-demo__composer { box-shadow: none; }
.style-demo--paper .style-demo__form-list { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.style-demo--paper .style-demo__form { padding: 17px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.style-demo--paper .style-demo__form:hover { background: var(--tint); }
.style-demo--paper .style-demo__form-icon { background: transparent; }
.style-demo--paper .style-demo__section-head h2 { font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 400; }

/* Charcoal is a more compact workspace, with the navigation to the right. */
.style-demo--charcoal .style-demo__nav { margin-left: auto; }
.style-demo--charcoal .style-demo__header > .user-menu { margin-left: 0; }
.style-demo--charcoal .style-demo__main { padding-top: 58px; }
.style-demo--charcoal .style-demo__intro h1 { font-size: clamp(38px, 4.3vw, 54px); font-weight: 550; }
.style-demo--charcoal .style-demo__composer { box-shadow: none; }
.style-demo--charcoal .style-demo__form { padding: 17px; }

@media (max-width: 1000px) {
  .style-gallery { padding: 44px 24px 28px; }
  .style-gallery__grid { gap: 14px; }
  .style-gallery__details { padding: 20px; }
  .style-gallery__mini { height: 260px; }
  .style-gallery__mini .style-demo { zoom: .32; min-height: 813px; }
}
@media (max-width: 760px) {
  .style-gallery__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 24px; }
  .style-gallery__mini { height: 320px; }
  .style-gallery__mini .style-demo { zoom: .4; min-height: 800px; }
  .style-gallery__details p { min-height: 0; max-width: none; }
  .style-preview__toolbar { flex-wrap: wrap; justify-content: center; padding: 12px 16px; gap: 10px; }
  .style-preview__back { margin-right: auto; }
  .style-preview__current { margin-left: auto; }
  .style-preview__switcher { order: 1; width: 100%; justify-content: center; }
  .style-demo__header { flex-wrap: wrap; gap: 18px; }
  .style-demo__nav, .style-demo--charcoal .style-demo__nav { order: 1; width: 100%; margin: 0; padding-top: 4px; }
  .style-demo--charcoal .style-demo__header > .user-menu { margin-left: auto; }
  .style-demo__main, .style-demo--charcoal .style-demo__main { padding-top: 48px; }
  .style-demo__intro h1 { font-size: 42px; }
  .style-demo__lede { font-size: 13px; }
  .style-demo__composer { padding: 18px 16px 13px; }
  .style-demo__field textarea { font-size: 16px; }
  .style-demo__search-foot > span { font-size: 10px; }
  .style-demo__footer { flex-wrap: wrap; gap: 8px; }
  /* Miniatures keep the desktop layout while the actual preview reflows. */
  .style-gallery__mini .style-demo__header { flex-wrap: nowrap; gap: 36px; }
  .style-gallery__mini .style-demo__nav { order: 0; width: auto; }
  .style-gallery__mini .style-demo--charcoal .style-demo__nav { margin-left: auto; }
  .style-gallery__mini .style-demo--charcoal .style-demo__header > .user-menu { margin-left: 0; }
  .style-gallery__mini .style-demo__intro h1 { font-size: 58px; }
  .style-gallery__mini .style-demo--paper .style-demo__intro h1 { font-size: 64px; }
}
