@layer reset, tokens, base, layout, components, states, enhancements;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body,
  h1,
  h2,
  h3,
  p,
  ul,
  ol,
  figure {
    margin: 0;
  }

  ul,
  ol {
    padding: 0;
  }

  ul[class],
  ol[class],
  nav ul {
    list-style: none;
  }

  img,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button {
    font: inherit;
    color: inherit;
  }

  button {
    cursor: pointer;
  }

  [hidden] {
    display: none !important;
  }
}

@layer tokens {
  :root {
    color-scheme: light;

    --white: oklch(99.5% 0.004 75);
    --cream: oklch(98.4% 0.011 72);
    --peach-50: oklch(97.2% 0.02 70);
    --peach-100: oklch(95.2% 0.033 68);
    --peach-200: oklch(92% 0.05 64);
    --apricot-300: oklch(87% 0.08 58);
    --orange-400: oklch(80.5% 0.125 55);
    --orange-500: oklch(72% 0.16 49);
    --orange-600: oklch(63.5% 0.165 44);
    --terra-700: oklch(55% 0.155 40);
    --terra-800: oklch(47% 0.135 37);
    --terra-900: oklch(38% 0.105 35);
    --ink: oklch(25% 0.028 45);
    --ink-soft: oklch(40% 0.032 50);
    --ink-muted: oklch(50% 0.032 55);
    --line: oklch(91.5% 0.026 66);
    --line-strong: oklch(85% 0.048 60);

    --surface: var(--white);
    --text: var(--ink);
    --text-soft: var(--ink-soft);
    --text-muted: var(--ink-muted);
    --link: var(--terra-700);
    --link-hover: var(--terra-800);
    --action: var(--terra-700);
    --field-border: var(--orange-600);
    --focus: var(--terra-700);

    --action-hover: oklch(51% 0.148 39);
    --ring-soft: oklch(80.5% 0.125 55 / 0.35);
    --shadow-tint: oklch(55% 0.155 40 / 0.14);
    --shadow-tint-strong: oklch(55% 0.155 40 / 0.28);
    --hairline: oklch(85% 0.048 60 / 0.6);
    --glass: oklch(99.5% 0.004 75 / 0.72);
    --ghost: oklch(72% 0.16 49 / 0.55);
    --glow-a: oklch(92% 0.05 64 / 0.9);
    --glow-b: oklch(95.2% 0.033 68 / 0.95);
    --glow-c: oklch(87% 0.08 58 / 0.5);
    --glow-d: oklch(87% 0.08 58 / 0.55);

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --gutter: clamp(1.125rem, 0.75rem + 1.8vw, 2rem);
    --shell: 70rem;
    --measure: 36rem;
    --radius-s: 0.75rem;
    --radius-m: 1.125rem;
    --radius-l: 1.5rem;
    --radius-xl: 2rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
    --shadow-s: 0 1px 2px oklch(38% 0.105 35 / 0.06), 0 4px 12px -6px var(--shadow-tint);
    --shadow-m: 0 1px 2px oklch(38% 0.105 35 / 0.06), 0 14px 34px -14px var(--shadow-tint-strong);
    --shadow-l: 0 2px 4px oklch(38% 0.105 35 / 0.05), 0 26px 60px -26px var(--shadow-tint-strong);

    --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M12 11v6M12 7.5v.5' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-search-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='m15.5 15.5 5 5M8.3 8.3l4.4 4.4m0-4.4-4.4 4.4' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M12 7v5.2l3.4 2' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --icon-hash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 3.5 7.5 20.5m9-17-2 17M4 8.5h16.5M3.5 15.5H20' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5c.6 4.2 2.3 5.9 6.5 6.5-4.2.6-5.9 2.3-6.5 6.5-.6-4.2-2.3-5.9-6.5-6.5 4.2-.6 5.9-2.3 6.5-6.5zM18.5 15.5c.3 1.9 1 2.7 3 3-2 .3-2.7 1-3 3-.3-2-1.1-2.7-3-3 1.9-.3 2.7-1.1 3-3z' fill='%23000'/%3E%3C/svg%3E");
    --icon-shelf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 18.5h18M6 18.5v2.5m12-2.5v2.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3Crect x='6.5' y='8' width='5' height='7.5' rx='1.4' fill='none' stroke='%23000' stroke-width='2' stroke-dasharray='2.6 2.2'/%3E%3Ccircle cx='16' cy='12.8' r='2.7' fill='none' stroke='%23000' stroke-width='2' stroke-dasharray='2.6 2.2'/%3E%3C/svg%3E");
    --icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.8 2.8 19.5h18.4z' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M12 9.5v4.5M12 16.8v.4' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 5 6v5.5c0 4.3 2.9 8 7 9.5 4.1-1.5 7-5.2 7-9.5V6z' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M12 8.5v4.5M12 15.7v.3' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13m-5.5-6 6 6-6 6' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --icon-lens: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3Cpath d='m15.5 15.5 5 5' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }

  @supports (color: color-mix(in oklch, white, black)) {
    :root {
      --action-hover: color-mix(in oklch, var(--terra-700), var(--terra-800));
      --ring-soft: color-mix(in oklch, var(--orange-400) 35%, transparent);
      --shadow-tint: color-mix(in oklch, var(--terra-700) 14%, transparent);
      --shadow-tint-strong: color-mix(in oklch, var(--terra-700) 28%, transparent);
      --hairline: color-mix(in oklch, var(--line-strong) 60%, transparent);
      --glass: color-mix(in oklch, var(--white) 72%, transparent);
      --ghost: color-mix(in oklch, var(--orange-500) 55%, transparent);
    }
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-tema="claro"]) {
      color-scheme: dark;
      --white: oklch(20% 0.02 45);
      --cream: oklch(17.5% 0.018 45);
      --peach-50: oklch(23% 0.028 48);
      --peach-100: oklch(26.5% 0.036 50);
      --peach-200: oklch(31% 0.048 50);
      --apricot-300: oklch(39% 0.07 48);
      --terra-700: oklch(76% 0.13 52);
      --terra-800: oklch(83% 0.1 58);
      --terra-900: oklch(90% 0.06 64);
      --ink: oklch(95.5% 0.012 70);
      --ink-soft: oklch(86% 0.022 65);
      --ink-muted: oklch(77% 0.028 60);
      --line: oklch(30% 0.03 48);
      --line-strong: oklch(38% 0.045 48);
      --action-hover: oklch(80% 0.115 55);
      --shadow-tint: oklch(8% 0.02 40 / 0.45);
      --shadow-tint-strong: oklch(6% 0.02 40 / 0.7);
      --hairline: oklch(38% 0.045 48 / 0.6);
      --glass: oklch(20% 0.02 45 / 0.72);
      --glow-a: oklch(40% 0.09 46 / 0.5);
      --glow-b: oklch(30% 0.05 50 / 0.6);
      --glow-c: oklch(48% 0.12 45 / 0.25);
      --glow-d: oklch(45% 0.1 46 / 0.35);
    }
  }

  :root[data-tema="escuro"] {
    color-scheme: dark;
    --white: oklch(20% 0.02 45);
    --cream: oklch(17.5% 0.018 45);
    --peach-50: oklch(23% 0.028 48);
    --peach-100: oklch(26.5% 0.036 50);
    --peach-200: oklch(31% 0.048 50);
    --apricot-300: oklch(39% 0.07 48);
    --terra-700: oklch(76% 0.13 52);
    --terra-800: oklch(83% 0.1 58);
    --terra-900: oklch(90% 0.06 64);
    --ink: oklch(95.5% 0.012 70);
    --ink-soft: oklch(86% 0.022 65);
    --ink-muted: oklch(77% 0.028 60);
    --line: oklch(30% 0.03 48);
    --line-strong: oklch(38% 0.045 48);
    --action-hover: oklch(80% 0.115 55);
    --shadow-tint: oklch(8% 0.02 40 / 0.45);
    --shadow-tint-strong: oklch(6% 0.02 40 / 0.7);
    --hairline: oklch(38% 0.045 48 / 0.6);
    --glass: oklch(20% 0.02 45 / 0.72);
    --glow-a: oklch(40% 0.09 46 / 0.5);
    --glow-b: oklch(30% 0.05 50 / 0.6);
    --glow-c: oklch(48% 0.12 45 / 0.25);
    --glow-d: oklch(45% 0.1 46 / 0.35);
  }

  @supports (transition-timing-function: linear(0, 1)) {
    :root {
      --ease-spring: linear(0, 0.22 6%, 0.56 13%, 0.84 21%, 0.98 29%, 1.045 37%, 1.058 44%, 1.04 53%, 1.012 64%, 0.998 77%, 1);
    }
  }
}

@layer base {
  html {
    background: var(--surface);
    scroll-padding-top: 1rem;
  }

  body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }

  p,
  li {
    text-wrap: pretty;
  }

  a {
    color: var(--link);
    text-decoration-line: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--hairline);
  }

  a:hover {
    color: var(--link-hover);
    text-decoration-color: currentColor;
  }

  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 0.375rem;
  }

  ::selection {
    background: var(--apricot-300);
    color: var(--ink);
  }

  b,
  strong {
    font-weight: 700;
  }

  code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 0.1em 0.4em;
    border-radius: 0.45em;
    color: var(--terra-900);
    background: var(--peach-100);
    white-space: nowrap;
  }

  .code-inline {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums slashed-zero;
    font-weight: 700;
    color: var(--terra-900);
    white-space: nowrap;
  }

  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    padding: 0.75rem 1.125rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--white);
    background: var(--terra-800);
    text-decoration: none;
    transform: translateY(-160%);
  }

  .skip-link:focus-visible {
    transform: none;
    color: var(--white);
  }
}

@layer layout {
  .shell {
    width: min(100% - 2 * var(--gutter), var(--shell));
    margin-inline: auto;
  }

  .site-header {
    position: relative;
    z-index: 2;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .site-main {
    flex: 1 0 auto;
  }

  .hero {
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    padding-block: clamp(0.75rem, 0.25rem + 2.5vw, 3rem) clamp(2.5rem, 1rem + 5vw, 5rem);
  }

  .page-home .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .page-home .brand-solo {
    grid-column: 2;
  }

  .header-nav {
    margin-inline-start: auto;
  }

  .page-home .hero {
    min-height: calc(100vh - 4.5rem);
    min-height: calc(100svh - 4.5rem);
    padding-top: clamp(0rem, 1.2vw - 0.25rem, 1.25rem);
    clip-path: inset(-4.5rem 0 0);
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: -4.5rem 0 0;
    z-index: -2;
    background:
      radial-gradient(58% 48% at 50% 0%, var(--glow-a), transparent 72%),
      radial-gradient(38% 34% at 6% 16%, var(--glow-b), transparent 72%),
      radial-gradient(34% 32% at 96% 24%, var(--glow-c), transparent 74%),
      linear-gradient(to bottom, var(--peach-50), var(--surface) 78%);
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(to bottom, transparent 0 4.5rem, var(--hairline) 4.5rem calc(4.5rem + 1px));
    -webkit-mask-image: radial-gradient(64% 52% at 50% 26%, black 18%, transparent 74%);
    mask-image: radial-gradient(64% 52% at 50% 26%, black 18%, transparent 74%);
    opacity: 0.5;
    pointer-events: none;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .section {
    padding-block: clamp(3.5rem, 2.25rem + 5vw, 7rem);
  }

  .section-title {
    font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
  }

  .site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--cream);
    padding-block: 1rem calc(1.125rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
  }

  .footer-inner {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
  }
}

@layer components {
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.75rem;
    color: var(--terra-900);
    text-decoration: none;
    border-radius: var(--radius-s);
  }

  .brand:hover {
    color: var(--terra-900);
  }

  .brand-mark {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    flex: none;
    overflow: hidden;
    border-radius: 0.85rem;
    background: var(--orange-400);
    box-shadow: 0 8px 16px -8px oklch(63.5% 0.165 44 / 0.8);
  }

  .brand-mark svg {
    width: 100%;
    height: 100%;
  }

  .brand-mark .carrinho {
    transform-box: view-box;
    transform-origin: 62px 98px;
  }

  .brand-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 850;
    letter-spacing: -0.06em;
    line-height: 1;
    padding-bottom: 0.1em;
  }

  .brand-solo .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
  }

  .header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.125rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--glass);
    color: var(--terra-800);
    font-weight: 650;
    font-size: 0.9375rem;
    text-decoration: none;
  }

  .header-link::before {
    content: "";
    width: 1rem;
    height: 1rem;
    background: currentColor;
    -webkit-mask: var(--icon-lens) center / contain no-repeat;
    mask: var(--icon-lens) center / contain no-repeat;
  }

  .header-link:hover {
    border-color: var(--orange-600);
    color: var(--terra-900);
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--glass);
    color: var(--terra-800);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-s);
  }

  .eyebrow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 0 4px var(--ring-soft);
  }

  .eyebrow-name {
    gap: 0.6rem;
    padding-inline: 0.85rem;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
  }

  .eyebrow-name .eyebrow-dot {
    width: 0.4rem;
    height: 0.4rem;
    box-shadow: 0 0 0 3px var(--ring-soft);
  }

  .hero-title {
    margin-top: 1.125rem;
    max-width: 14ch;
    font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.75rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--ink);
  }

  .hero-accent {
    display: inline-block;
    color: var(--terra-700);
  }

  .hero-lead {
    margin-top: 1rem;
    max-width: 34ch;
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    color: var(--text-soft);
  }

  .search {
    width: min(100%, var(--measure));
    margin-top: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
  }

  .search-label {
    display: block;
    margin-bottom: 0.875rem;
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    font-weight: 600;
    color: var(--text-soft);
  }

  .search-field {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.4rem 0.4rem 1.05rem;
    border: 2px solid var(--field-border);
    border-radius: 1.6rem;
    background: var(--surface);
    box-shadow: inset 0 1px 2px oklch(38% 0.105 35 / 0.06), var(--shadow-m);
  }

  .search-field:focus-within {
    border-color: var(--action);
    box-shadow: 0 0 0 5px var(--ring-soft), var(--shadow-l);
  }

  .search-icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--orange-600);
  }

  .search-input {
    flex: 1;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0 0.375rem;
    border: 0;
    background: transparent;
    font-size: 1.375rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums slashed-zero;
    color: var(--ink);
    caret-color: var(--terra-700);
  }

  .search-input:focus {
    outline: none;
  }

  .search-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
    opacity: 1;
  }

  .search-submit {
    flex: none;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 0;
    border-radius: 1.15rem;
    color: var(--white);
    background: linear-gradient(160deg, var(--terra-700), var(--terra-800));
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.25), 0 6px 14px -6px var(--shadow-tint-strong);
  }

  .search-submit svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .search-hint {
    margin-top: 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
  }

  .search-hint b {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums slashed-zero;
    color: var(--terra-800);
  }

  .results {
    container: results / inline-size;
    display: grid;
    width: min(100%, var(--measure));
    margin-top: 1.5rem;
    text-align: left;
  }

  .results-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.875rem;
  }

  .results-body.is-stale {
    opacity: 0.45;
    pointer-events: none;
  }

  .results-heading {
    font-weight: 700;
    color: var(--text-soft);
  }

  .shelf {
    display: grid;
    justify-items: center;
    margin-inline: -0.75rem;
  }

  .shelf-ghosts {
    display: none;
    width: min(64%, 15rem);
    height: auto;
    color: var(--ghost);
  }

  .results-body:empty + .shelf .shelf-ghosts {
    display: block;
  }

  .shelf-plank {
    position: relative;
    width: 100%;
    height: 0.875rem;
    border-radius: 0.5rem;
    background: linear-gradient(to bottom, var(--apricot-300), var(--orange-400) 70%);
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.6), inset 0 -2px 0 oklch(63.5% 0.165 44 / 0.35), 0 16px 22px -14px var(--shadow-tint-strong);
  }

  .shelf-plank::before,
  .shelf-plank::after {
    content: "";
    position: absolute;
    top: 100%;
    width: 0.75rem;
    height: 1.125rem;
    border-radius: 0 0 0.4rem 0.4rem;
    background: linear-gradient(to bottom, var(--orange-400), var(--apricot-300));
  }

  .shelf-plank::before {
    left: 12%;
  }

  .shelf-plank::after {
    right: 12%;
  }

  .shelf-caption {
    display: none;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    text-align: center;
  }

  .results-body:empty ~ .shelf-caption {
    display: block;
  }

  .result {
    position: relative;
    padding: 1.125rem 1.125rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    box-shadow: var(--shadow-l);
  }

  .result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .code-badge,
  .recent-chip {
    --tag-point: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem 0.4rem calc(var(--tag-point) + 0.35rem);
    border-radius: 0 0.6rem 0.6rem 0;
    background: linear-gradient(100deg, var(--peach-200), var(--peach-100) 60%);
    color: var(--terra-900);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums slashed-zero;
    clip-path: polygon(var(--tag-point) 0, 100% 0, 100% 100%, var(--tag-point) 100%, 0 50%);
  }

  .code-badge::before,
  .recent-chip::before {
    content: "";
    flex: none;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 1px 2px oklch(38% 0.105 35 / 0.35), 0 0 0 2px var(--apricot-300);
  }

  .copy-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--peach-50);
    color: var(--terra-800);
    font-size: 0.875rem;
    font-weight: 700;
  }

  .copy-button:hover {
    border-color: var(--line-strong);
    background: var(--peach-100);
  }

  .copy-button.is-done {
    color: var(--terra-900);
    background: var(--peach-200);
    border-color: var(--line-strong);
  }

  .result-title {
    margin-top: 0.875rem;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--ink);
    text-wrap: pretty;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    unicode-bidi: isolate;
  }

  .result-title.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .title-toggle,
  .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font-weight: 650;
    font-size: 0.9375rem;
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--hairline);
  }

  .title-toggle:hover,
  .link-button:hover {
    color: var(--link-hover);
    text-decoration-color: currentColor;
  }

  .result-actions {
    display: grid;
    margin-top: 1rem;
  }

  .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-m);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
  }

  .button svg {
    flex: none;
  }

  .button-primary {
    min-height: 3.625rem;
    font-size: 1.1875rem;
    color: var(--white);
    background: linear-gradient(165deg, var(--terra-700), var(--terra-800));
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.22), inset 0 -2px 0 oklch(38% 0.105 35 / 0.25), 0 12px 26px -12px var(--shadow-tint-strong);
    overflow: hidden;
  }

  .button-primary:hover {
    color: var(--white);
    background: linear-gradient(165deg, var(--action-hover), var(--terra-900));
  }

  .button-secondary {
    color: var(--terra-800);
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-s);
  }

  .button-secondary:hover {
    color: var(--terra-900);
    border-color: var(--orange-600);
  }

  .result-unavailable {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .result-unavailable {
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-s);
    background: var(--peach-50);
    color: var(--terra-900);
    font-size: 0.9375rem;
    font-weight: 600;
  }

  .result-compact {
    padding: 1rem;
    box-shadow: var(--shadow-m);
  }

  .result-compact .result-title {
    font-size: 1.0625rem;
    -webkit-line-clamp: 2;
  }

  .result-compact .button-primary {
    min-height: 3.125rem;
    font-size: 1.0625rem;
  }

  .result-loading {
    display: grid;
    gap: 0.75rem;
  }

  .skeleton {
    height: 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--peach-100), var(--peach-50) 45%, var(--peach-100) 70%);
    background-size: 220% 100%;
  }

  .skeleton-badge {
    width: 5.5rem;
    height: 1.9rem;
  }

  .skeleton-line {
    height: 1.25rem;
  }

  .skeleton-short {
    width: 62%;
  }

  .skeleton-button {
    height: 3.625rem;
    border-radius: var(--radius-m);
  }

  .notice {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.875rem;
    padding: 1.125rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    box-shadow: var(--shadow-m);
  }

  .notice-static {
    display: block;
    color: var(--terra-900);
    font-weight: 600;
    background: var(--peach-50);
  }

  .notice-icon {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.95rem;
    background: var(--peach-100);
  }

  .notice-icon::before {
    content: "";
    position: absolute;
    inset: 0.6rem;
    background: var(--terra-700);
    -webkit-mask: var(--icon, var(--icon-info)) center / contain no-repeat;
    mask: var(--icon, var(--icon-info)) center / contain no-repeat;
  }

  .notice-title {
    font-weight: 750;
    color: var(--ink);
    line-height: 1.35;
    padding-top: 0.2rem;
  }

  .notice-text {
    margin-top: 0.3rem;
    color: var(--text-soft);
    font-size: 0.9375rem;
  }

  .notice-text:empty {
    display: none;
  }

  .notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
  }

  .notice-actions:empty {
    display: none;
  }

  .notice-actions .button {
    min-height: 2.75rem;
    padding: 0.5rem 1.05rem;
    font-size: 0.9375rem;
  }

  .recent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    width: min(100%, var(--measure));
    margin-top: 1.25rem;
  }

  .recent-label {
    width: 100%;
    font-size: 0.875rem;
    font-weight: 650;
    color: var(--text-muted);
  }

  .recent-hint {
    font-weight: 500;
  }

  .recent-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .recent-chip {
    min-height: 2.75rem;
    border: 0;
  }

  .recent-chip:hover {
    background: linear-gradient(100deg, var(--apricot-300), var(--peach-200) 60%);
  }

  .recent-chip:focus-visible {
    outline: none;
  }

  .recent-list li:has(.recent-chip:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 0.6rem;
  }

  .back-to-search {
    display: none;
  }

  .steps {
    position: relative;
    display: grid;
    gap: 1.25rem;
    margin-top: 2.25rem;
    counter-reset: step;
  }

  .step {
    position: relative;
    display: flex;
    flex-direction: column;
    counter-increment: step;
    padding: 0.75rem 0.75rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 1.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-m);
  }

  .step-art {
    position: relative;
    display: grid;
    place-items: center;
    height: 10rem;
    margin-bottom: 1.25rem;
    border-radius: 1.25rem;
    overflow: hidden;
    overflow: clip;
    background:
      radial-gradient(70% 90% at 50% 110%, var(--glow-d), transparent 70%),
      linear-gradient(to bottom, var(--peach-50), var(--peach-100));
  }

  .step-title,
  .step-text {
    padding-inline: 0.75rem;
  }

  .step-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  .step-title::before {
    content: counter(step, decimal-leading-zero);
    content: counter(step, decimal-leading-zero) / "";
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--terra-700);
  }

  .step-text {
    margin-top: 0.4rem;
    color: var(--text-soft);
  }

  .art-post {
    display: grid;
    gap: 0.28rem;
    width: 5.4rem;
    padding: 0.32rem;
    border: 3px solid var(--ink);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-m);
    transform: rotate(-4deg);
    view-timeline: --post;
  }

  .art-post-head,
  .art-caption {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .art-post-head::before {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: linear-gradient(165deg, var(--orange-400), var(--terra-700));
  }

  .art-post-head::after,
  .art-caption::after {
    content: "";
    flex: 1;
    max-width: 2.4rem;
    height: 0.25rem;
    border-radius: 999px;
    background: var(--peach-200);
  }

  .art-media {
    aspect-ratio: 1;
    border-radius: 0.55rem;
    overflow: hidden;
    overflow: clip;
  }

  .art-track {
    display: flex;
    width: 300%;
    height: 100%;
  }

  .art-track > * {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background:
      linear-gradient(transparent 83%, oklch(100% 0 0 / 0.5) 83% 86.5%, transparent 86.5%),
      var(--slide, linear-gradient(160deg, var(--orange-400), var(--terra-700)));
  }

  .art-track > *::before {
    content: "";
    width: 30%;
    aspect-ratio: 3 / 5;
    margin-bottom: 17%;
    border-radius: 0.3rem 0.3rem 0.45rem 0.45rem;
    background: var(--glass);
    box-shadow: 0 6px 10px -6px oklch(38% 0.105 35 / 0.6);
  }

  .art-track > :nth-child(2) {
    --slide: linear-gradient(160deg, var(--apricot-300), var(--orange-600));
  }

  .art-track > :nth-child(2)::before {
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .art-track > :nth-child(3) {
    --slide: linear-gradient(160deg, var(--terra-700), var(--terra-900));
  }

  .art-track > :nth-child(3)::before {
    width: 60%;
    aspect-ratio: 8 / 5;
    border-radius: 0.35rem;
  }

  .art-dots {
    justify-self: center;
    width: 1.1rem;
    height: 0.3rem;
    background: radial-gradient(circle closest-side, var(--peach-200) 90%, transparent) 0 0 / 0.3rem 0.3rem space;
  }

  .art-dots::before {
    content: "";
    display: block;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background: var(--terra-700);
  }

  .art-tag {
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    background: var(--peach-100);
    color: var(--terra-900);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .art-field {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: min(88%, 12rem);
    padding: 0.55rem 0.8rem;
    border: 2px solid var(--field-border);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: 0 0 0 4px var(--ring-soft), var(--shadow-m);
  }

  .art-lens {
    width: 1rem;
    height: 1rem;
    flex: none;
    background: var(--orange-600);
    -webkit-mask: var(--icon-lens) center / contain no-repeat;
    mask: var(--icon-lens) center / contain no-repeat;
  }

  .art-typed {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--ink);
    font-variant-numeric: tabular-nums slashed-zero;
  }

  .art-caret {
    width: 2px;
    height: 1.2rem;
    margin-left: -0.3rem;
    border-radius: 1px;
    background: var(--terra-700);
  }

  .art-result {
    grid-template-rows: 1fr auto;
    align-items: end;
    padding: 1rem 1.25rem 0.9rem;
  }

  .art-card {
    display: grid;
    gap: 0.4rem;
    justify-self: center;
    width: min(100%, 11rem);
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--white);
    box-shadow: var(--shadow-m);
  }

  .art-badge {
    justify-self: start;
    padding: 0.1rem 0.45rem 0.1rem 0.7rem;
    border-radius: 0 0.3rem 0.3rem 0;
    clip-path: polygon(0.4rem 0, 100% 0, 100% 100%, 0.4rem 100%, 0 50%);
    background: var(--peach-200);
    color: var(--terra-900);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.05em;
  }

  .art-line {
    height: 0.45rem;
    border-radius: 999px;
    background: var(--peach-200);
  }

  .art-line-short {
    width: 64%;
  }

  .art-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem;
    border-radius: 0.5rem;
    background: linear-gradient(165deg, var(--terra-700), var(--terra-800));
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 800;
  }

  .art-button::after {
    content: "";
    width: 0.7rem;
    height: 0.7rem;
    background: currentColor;
    -webkit-mask: var(--icon-arrow) center / contain no-repeat;
    mask: var(--icon-arrow) center / contain no-repeat;
  }

  .art-plank {
    justify-self: stretch;
    height: 0.5rem;
    margin-top: -0.1rem;
    border-radius: 0.3rem;
    background: linear-gradient(to bottom, var(--apricot-300), var(--orange-400));
    box-shadow: 0 8px 12px -8px var(--shadow-tint-strong);
  }

  .about-section {
    background: linear-gradient(to bottom, var(--surface), var(--cream));
  }

  .about {
    display: grid;
    justify-items: center;
    gap: 1.35rem;
  }

  .about-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.1rem;
  }

  .about-bubble {
    position: relative;
    max-width: 40rem;
    padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem) clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background: linear-gradient(to bottom, var(--white) 30%, var(--peach-50));
    box-shadow: var(--shadow-l);
    text-align: center;
  }

  .about-bubble::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    border: solid var(--line-strong);
    border-width: 1px 0 0 1px;
    border-top-left-radius: 0.3rem;
    background: var(--white);
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .about-bubble > * + * {
    margin-top: 1rem;
  }

  .about-bubble .section-title + * {
    margin-top: 1.25rem;
  }

  .about-lead {
    font-size: 1.1875rem;
    line-height: 1.55;
    color: var(--ink);
  }

  .about-bubble p:not(.about-lead) {
    color: var(--text-soft);
  }

  .check-list {
    display: grid;
    gap: 0.7rem;
  }

  .check-list li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--text-soft);
  }

  .check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--peach-200);
  }

  .check-list li::after {
    content: "";
    position: absolute;
    left: 0.28rem;
    top: calc(0.2em + 0.28rem);
    width: 0.74rem;
    height: 0.74rem;
    background: var(--terra-800);
    -webkit-mask: var(--icon-check) center / contain no-repeat;
    mask: var(--icon-check) center / contain no-repeat;
  }

  .footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.1rem;
  }

  .footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    font-weight: 600;
    color: var(--terra-800);
  }

  .footer-note {
    color: var(--text-muted);
  }

  .footer-social {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 0.75rem 3rem;
    margin-bottom: 0.75rem;
  }

  @media (min-width: 38rem) {
    .footer-social {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 64rem) {
    .footer-inner:has(.footer-social) {
      grid-template-columns: auto 1fr auto;
      grid-template-rows: 1fr repeat(3, auto) 1fr;
      column-gap: 2.5rem;
    }

    .footer-inner:has(.footer-social) > :not(.footer-social) {
      grid-column: 2;
    }

    .footer-inner:has(.footer-social) .footer-nav {
      grid-row: 2;
    }

    .footer-inner:has(.footer-social) .footer-note {
      grid-row: 3;
    }

    .footer-inner:has(.footer-social) .footer-note:last-child {
      grid-row: 4;
    }

    .footer-inner .footer-social {
      grid-column: 1 / -1;
      grid-row: 1 / -1;
      grid-template-columns: subgrid;
      grid-auto-flow: column;
      grid-template-rows: repeat(2, auto);
      align-content: center;
      gap: 0.5rem 2.5rem;
      margin-bottom: 0;
    }

    .footer-social .social-account:nth-of-type(n + 3) {
      grid-column: 3;
    }
  }

  .social-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }

  .social-account {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
  }

  .social-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink);
  }

  .social-list {
    display: flex;
    gap: 0.25rem;
  }

  .social-link {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-s);
    color: var(--text-soft);
  }

  .social-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .doc {
    max-width: 46rem;
    padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) clamp(3rem, 2rem + 4vw, 5rem);
  }

  .doc-header {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
  }

  .doc-title {
    margin-top: 1rem;
    font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.04;
  }

  .doc-meta {
    margin-top: 0.875rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
  }

  .doc-summary {
    margin-top: 2rem;
    padding: 1.375rem 1.5rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-l);
    background: linear-gradient(160deg, var(--peach-50), var(--surface) 75%);
    box-shadow: var(--shadow-m);
  }

  .doc-summary-title {
    margin-bottom: 0.875rem;
    font-size: 1.125rem;
    font-weight: 800;
  }

  .doc-section {
    margin-top: 2.75rem;
    scroll-margin-top: 1.5rem;
  }

  .doc-section h2 {
    font-size: 1.4375rem;
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  .doc-section > * + * {
    margin-top: 0.875rem;
  }

  .doc-section p,
  .doc-list li {
    color: var(--text-soft);
  }

  .doc-section strong {
    color: var(--ink);
  }

  .doc-list {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.25rem;
  }

  .doc-list li::marker {
    color: var(--orange-600);
  }

  .doc-back {
    margin-top: 3rem;
  }

  .back-link {
    font-weight: 750;
  }

  .hero-404 .hero-title {
    max-width: 16ch;
    font-size: clamp(2.25rem, 1.5rem + 3.6vw, 4rem);
  }

  .page-404 .shelf-ghosts,
  .page-404 .shelf-caption {
    display: none !important;
  }

  .empty-shelf {
    width: min(15rem, 70%);
    height: auto;
    margin-bottom: 0.75rem;
  }

  .home-link-wrap {
    margin-top: 2.25rem;
  }
}

@layer states {
  .notice[data-tone="notfound"] { --icon: var(--icon-search-x); }
  .notice[data-tone="fresh"] { --icon: var(--icon-clock); }
  .notice[data-tone="invalid"] { --icon: var(--icon-hash); }
  .notice[data-tone="suggest"] { --icon: var(--icon-spark); }
  .notice[data-tone="empty"] { --icon: var(--icon-shelf); }
  .notice[data-tone="error"] { --icon: var(--icon-alert); }
  .notice[data-tone="framed"] { --icon: var(--icon-shield); }
  .notice[data-tone="loading"] { --icon: var(--icon-clock); }

  .notice[data-tone="gone"] {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 1.5rem 1.25rem 1.375rem;
    text-align: center;
  }

  .notice[data-tone="gone"] .notice-icon {
    width: 5.5rem;
    height: 5.5rem;
    overflow: hidden;
    border-radius: 1.6rem;
    background: var(--orange-400);
    box-shadow: 0 12px 22px -12px oklch(63.5% 0.165 44 / 0.8);
  }

  .notice[data-tone="gone"] .notice-icon::before {
    content: none;
  }

  .notice[data-tone="gone"] .notice-title {
    font-size: 1.125rem;
  }

  .notice[data-tone="gone"] .notice-text {
    max-width: 28ch;
    margin-inline: auto;
  }

  .sad-cart {
    width: 100%;
    height: 100%;
  }

  .sad-cart .carrinho {
    transform-box: view-box;
    transform-origin: 60px 94px;
  }

  .sad-cart .lagrima {
    transform-box: fill-box;
    transform-origin: top;
    filter: drop-shadow(0 0 2px #3fb0ff);
  }

  .notice[data-tone="error"] .notice-icon,
  .notice[data-tone="framed"] .notice-icon {
    background: var(--peach-200);
  }

  .notice[data-tone="error"] .notice-icon::before,
  .notice[data-tone="framed"] .notice-icon::before {
    background: var(--terra-900);
  }

  .result.is-unavailable .result-title {
    color: var(--text-soft);
  }

  :root[data-framed] .result-actions,
  :root[data-framed] .copy-button {
    display: none;
  }
}

@layer layout {
  @container results (min-width: 30rem) {
    .result {
      padding: 1.5rem 1.5rem 1.625rem;
    }

    .result-title {
      font-size: 1.375rem;
    }

    .result-compact {
      padding: 1.125rem 1.25rem;
    }

    .result-compact .result-title {
      font-size: 1.125rem;
    }
  }

  @media (min-width: 48rem) {
    .steps {
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
    }
  }
}

@layer enhancements {
  @media (hover: hover) {
    .button-primary,
    .search-submit,
    .copy-button,
    .recent-chip,
    .header-link,
    .social-link {
      transition: transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s, border-color 0.2s, color 0.2s;
    }

    .button-primary:hover {
      transform: translateY(-2px);
      box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.22), inset 0 -2px 0 oklch(38% 0.105 35 / 0.25), 0 18px 32px -14px var(--shadow-tint-strong);
    }

    .search-submit:hover {
      transform: scale(1.04);
    }

    .recent-chip:hover,
    .header-link:hover,
    .social-link:hover {
      transform: translateY(-1px);
    }

    .social-link:hover {
      color: var(--link);
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }

    .site-header .brand {
      view-transition-name: brand;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
      animation-duration: 0.28s;
    }

    .button-primary:active,
    .search-submit:active,
    .copy-button:active,
    .recent-chip:active {
      transform: scale(0.97);
      transition-duration: 0.08s;
    }

    .search-field {
      transition: border-color 0.2s, box-shadow 0.3s var(--ease-out);
    }

    .search-field::before {
      content: "";
      position: absolute;
      inset: -4px;
      z-index: -1;
      border-radius: inherit;
      background: conic-gradient(from var(--spin, 0deg), var(--orange-400), var(--apricot-300), var(--orange-600), var(--peach-200), var(--orange-400));
      filter: blur(14px);
      opacity: 0;
      transition: opacity 0.45s var(--ease-out);
    }

    .search-field:focus-within::before {
      opacity: 0.6;
      animation: ignite 2.4s var(--ease-out) 1 both;
    }

    .result,
    .notice {
      transition: opacity 0.4s var(--ease-out), transform 0.7s var(--ease-spring);
    }

    @starting-style {
      .result,
      .notice {
        opacity: 0;
        transform: translateY(-1.25rem) scale(0.97);
      }
    }

    .results-body {
      transition: opacity 0.2s;
    }

    .shelf-ghosts {
      animation: float 5s ease-in-out infinite alternate;
    }

    .about-avatar {
      animation: float 3.2s ease-in-out infinite alternate;
    }

    .skeleton {
      animation: shimmer 1.4s linear infinite;
    }

    .button-primary::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(105deg, transparent 35%, oklch(100% 0 0 / 0.3) 50%, transparent 65%);
      transform: translateX(-120%);
      animation: shine 1.2s 0.45s var(--ease-out) 1 both;
      pointer-events: none;
    }

    .art-caret {
      animation: blink 1.1s steps(1) infinite;
    }
  }

  @keyframes ignite {
    from { --spin: 0deg; }
    to { --spin: 360deg; }
  }

  @keyframes shimmer {
    from { background-position: 110% 0; }
    to { background-position: -110% 0; }
  }

  @keyframes shine {
    to { transform: translateX(120%); }
  }

  @keyframes float {
    to { transform: translateY(-0.3rem); }
  }

  @keyframes blink {
    50% { opacity: 0; }
  }

  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .step {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 30%;
      }

      .about-bubble {
        animation: bubble-in linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 35%;
      }

      @keyframes rise {
        from {
          transform: translateY(2rem) scale(0.96) rotate(-1deg);
        }
      }

      @keyframes bubble-in {
        from {
          opacity: 0;
          transform: translateY(2.5rem) scale(0.94);
        }
      }
    }
  }

  @supports (corner-shape: squircle) {
    .result,
    .step,
    .about-bubble,
    .doc-summary,
    .notice {
      corner-shape: squircle;
      border-radius: 2.75rem;
    }

    .step-art {
      corner-shape: squircle;
      border-radius: 2.25rem;
    }

    .search-field {
      corner-shape: squircle;
      border-radius: 2.5rem;
    }

    .brand-mark {
      corner-shape: squircle;
      border-radius: 1.4rem;
    }
  }

  @supports (text-box: trim-both cap alphabetic) {
    .button,
    .eyebrow,
    .code-badge,
    .copy-button {
      text-box: trim-both cap alphabetic;
    }
  }

  @media (forced-colors: active) {
    .search-field,
    .result,
    .notice,
    .button,
    .step,
    .about-bubble,
    .copy-button,
    .recent-chip {
      border: 2px solid CanvasText;
    }

    .brand-mark,
    .sad-cart,
    .notice-icon::before,
    .check-list li::after {
      forced-color-adjust: none;
    }
  }

  @media print {
    .site-header nav,
    .search,
    .results,
    .recent,
    .skip-link,
    .steps-section {
      display: none !important;
    }

    .hero::before,
    .hero::after {
      display: none;
    }
  }
  .shelf-ghosts > * {
    transform-box: fill-box;
    transform-origin: 50% 100%;
  }

  .shelf-ghosts,
  .results-body > .result:first-child,
  .results-body > article:first-of-type {
    view-transition-name: produto;
  }

  .shelf-plank {
    view-transition-name: prateleira;
  }

  ::view-transition-group(produto) {
    animation-duration: 0.55s;
    animation-timing-function: var(--ease-spring);
  }

  ::view-transition-old(produto) {
    animation: 0.22s ease-in both vt-out;
  }

  ::view-transition-new(produto) {
    animation: 0.4s 0.08s ease-out both vt-in;
  }

  ::view-transition-group(prateleira) {
    animation-duration: 0.6s;
    animation-timing-function: var(--ease-spring);
  }

  ::view-transition-group(root) {
    animation-duration: 0.2s;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero:has(.search-input:focus) .results-body:empty + .shelf .shelf-ghosts {
      color: var(--orange-500);
    }

    .hero:has(.search-input:not(:placeholder-shown)) .results-body:empty + .shelf .shelf-ghosts > * {
      animation: march 0.9s linear infinite, hop 0.5s var(--ease-out) infinite alternate;
    }

    .hero:has(.search-input:not(:placeholder-shown)) .results-body:empty + .shelf .shelf-ghosts > :nth-child(2) {
      animation-delay: 0s, 0.16s;
    }

    .hero:has(.search-input:not(:placeholder-shown)) .results-body:empty + .shelf .shelf-ghosts > :nth-child(3) {
      animation-delay: 0s, 0.32s;
    }

    .results:has(.results-body > .result:not(.result-loading)) .shelf-plank {
      animation: settle 0.9s var(--ease-spring) 0.12s both;
    }

    .result .code-badge {
      -webkit-mask-image: linear-gradient(90deg, #000 var(--print), transparent var(--print));
      mask-image: linear-gradient(90deg, #000 var(--print), transparent var(--print));
      animation: print 0.75s steps(7, end) 0.35s both;
    }

    .brand-solo .carrinho {
      animation: pulinho 3.2s var(--ease-out) 0.6s infinite;
    }

    .brand:hover .carrinho {
      animation: pulinho 3.2s var(--ease-out);
    }
  }

  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .button-primary::before {
      content: "";
      position: absolute;
      inset: 0;
      padding: 2px;
      border-radius: inherit;
      background: conic-gradient(from var(--spin, 0deg), transparent 0 55%, var(--apricot-300), var(--orange-400) 80%, transparent);
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
      opacity: 0;
      transition: opacity 0.3s;
      pointer-events: none;
    }

    .button-primary:hover::before {
      opacity: 1;
      animation: ignite 1.6s linear infinite;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation: none !important;
    }
  }

  @keyframes vt-out {
    to { opacity: 0; }
  }

  @keyframes vt-in {
    from { opacity: 0; }
  }

  @keyframes march {
    to { stroke-dashoffset: -15; }
  }

  @keyframes hop {
    to { transform: translateY(-0.28rem); }
  }

  @keyframes pulinho {
    0%, 40%, 100% { transform: none; }
    10% { transform: translateY(-9px) rotate(-4deg); }
    20% { transform: scale(1.05, 0.93); }
    28% { transform: none; }
  }

  @keyframes settle {
    30% { transform: translateY(0.3rem); }
  }

  @keyframes print {
    from { --print: 0%; }
    to { --print: 100%; }
  }

  @supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
      .page-home .hero::before {
        animation: glow-drift linear both;
        animation-timeline: scroll(root);
        animation-range: 0 100vh;
      }

      .page-home .hero::after {
        animation: lines-drift linear both;
        animation-timeline: scroll(root);
        animation-range: 0 100vh;
      }

      .art-typed {
        animation: type steps(6, end) both;
        animation-timeline: view();
        animation-range: entry 60% cover 45%;
      }

      .art-track,
      .art-dots::before {
        animation: swipe linear both;
        animation-timeline: --post;
        animation-range: entry 30% exit 25%;
      }

      .art-dots::before {
        animation-name: swipe-dot;
      }

      .art-button {
        animation: press linear both;
        animation-timeline: view();
        animation-range: cover 38% cover 52%;
      }

      .art-post {
        animation: tilt linear both;
        animation-timeline: view();
        animation-range: entry 20% exit 30%;
      }
    }

    .page-home .site-main {
      background: linear-gradient(to top, var(--cream) 5rem, transparent 5rem);
    }

    .page-home .back-to-search {
      position: sticky;
      bottom: max(1rem, env(safe-area-inset-bottom, 0px));
      z-index: 5;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      width: fit-content;
      min-height: 3rem;
      margin: -2rem max(1rem, env(safe-area-inset-right, 0px)) 1rem auto;
      padding: 0.6rem 1.15rem 0.6rem 0.95rem;
      border-radius: 999px;
      background: linear-gradient(165deg, var(--terra-700), var(--terra-800));
      color: var(--white);
      font-weight: 700;
      text-decoration: none;
      box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.22), 0 14px 30px -12px var(--shadow-tint-strong);
      animation: pill linear both;
      animation-timeline: scroll(root);
      animation-range: 85vh 110vh;
    }

    .page-home .back-to-search::before {
      content: "";
      width: 1.1rem;
      height: 1.1rem;
      background: currentColor;
      -webkit-mask: var(--icon-lens) center / contain no-repeat;
      mask: var(--icon-lens) center / contain no-repeat;
    }

    .page-home .back-to-search:hover {
      color: var(--white);
    }

    .page-doc::before {
      content: "";
      position: fixed;
      inset: 0 0 auto;
      z-index: 5;
      height: 0.25rem;
      background: linear-gradient(90deg, var(--orange-400), var(--terra-700));
      transform-origin: 0 50%;
      animation: reading linear both;
      animation-timeline: scroll(root);
    }
  }

  @keyframes glow-drift {
    to { transform: translateY(18%) scale(1.06); }
  }

  @keyframes lines-drift {
    to { transform: translateY(12%); }
  }

  @keyframes type {
    from { clip-path: inset(0 100% 0 0); }
  }

  @keyframes swipe {
    0%, 28% { transform: none; }
    38%, 62% { transform: translateX(-33.333%); }
    72%, 100% { transform: translateX(-66.667%); }
  }

  @keyframes swipe-dot {
    0%, 28% { transform: none; }
    38%, 62% { transform: translateX(0.4rem); }
    72%, 100% { transform: translateX(0.8rem); }
  }

  @keyframes press {
    50% { transform: scale(0.94); }
  }

  @keyframes tilt {
    from { transform: rotate(-9deg) translateY(0.5rem); }
    to { transform: rotate(3deg) translateY(-0.25rem); }
  }

  @keyframes pill {
    from {
      opacity: 0;
      visibility: hidden;
      transform: translateY(1rem) scale(0.9);
    }
    to {
      opacity: 1;
      visibility: visible;
      transform: none;
    }
  }

  @keyframes reading {
    from { transform: scaleX(0); }
  }

  @supports (transition-delay: calc(sibling-index() * 1ms)) {
    @media (prefers-reduced-motion: no-preference) {
      .results-body > * {
        transition-delay: calc((sibling-index() - 1) * 80ms);
      }

      .recent-list > li {
        animation: pop 0.45s var(--ease-spring) both;
        animation-delay: calc((sibling-index() - 1) * 70ms);
      }
    }
  }

  @keyframes pop {
    from {
      opacity: 0;
      transform: translateY(0.5rem) scale(0.9);
    }
  }

}

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

@property --print {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@layer components {
  .theme-toggle {
    --largura: 3.5rem;
    --altura: 2rem;
    --bola: 1.5rem;
    position: relative;
    flex: none;
    width: var(--largura);
    height: var(--altura);
    padding: 0;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(90deg, oklch(50% 0.15 38), oklch(66% 0.15 50));
    box-shadow: inset 0 1px 3px oklch(25% 0.08 35 / 0.45), 0 6px 14px -8px var(--shadow-tint-strong);
    -webkit-tap-highlight-color: transparent;
  }

  .page-home .theme-toggle {
    justify-self: end;
  }

  .theme-toggle::before,
  .theme-toggle::after,
  .theme-toggle-knob::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
  }

  .theme-toggle::before {
    background:
      radial-gradient(circle at 18% 30%, oklch(98% 0.03 95) 0 1px, transparent 1.6px),
      radial-gradient(circle at 34% 70%, oklch(98% 0.03 95) 0 0.8px, transparent 1.4px),
      radial-gradient(circle at 47% 24%, oklch(98% 0.03 95) 0 1.2px, transparent 1.8px),
      radial-gradient(circle at 26% 52%, oklch(98% 0.03 95 / 0.7) 0 0.7px, transparent 1.2px),
      radial-gradient(circle at 56% 62%, oklch(98% 0.03 95 / 0.8) 0 0.8px, transparent 1.4px),
      linear-gradient(90deg, oklch(26% 0.07 300), oklch(34% 0.09 285));
    opacity: 0;
  }

  .theme-toggle::after {
    background:
      radial-gradient(circle at 66% 92%, oklch(97% 0.02 80) 0 0.4rem, transparent calc(0.4rem + 0.5px)),
      radial-gradient(circle at 81% 80%, oklch(97% 0.02 80) 0 0.5rem, transparent calc(0.5rem + 0.5px)),
      radial-gradient(circle at 96% 94%, oklch(97% 0.02 80) 0 0.45rem, transparent calc(0.45rem + 0.5px));
  }

  .theme-toggle-knob {
    position: absolute;
    z-index: 1;
    top: calc((var(--altura) - var(--bola)) / 2);
    left: calc((var(--altura) - var(--bola)) / 2);
    width: var(--bola);
    height: var(--bola);
    border-radius: 50%;
    background: oklch(91% 0.14 92);
    box-shadow: 0 0 0 0.25rem oklch(92% 0.13 92 / 0.25), 0 0 0.75rem oklch(90% 0.15 90 / 0.8), inset -0.125rem -0.15rem 0 oklch(80% 0.16 75);
  }

  .theme-toggle-knob::before {
    background:
      radial-gradient(circle at 36% 34%, oklch(84% 0.02 80) 0 0.2rem, transparent calc(0.2rem + 0.5px)),
      radial-gradient(circle at 66% 62%, oklch(84% 0.02 80) 0 0.14rem, transparent calc(0.14rem + 0.5px)),
      radial-gradient(circle at 62% 26%, oklch(84% 0.02 80) 0 0.08rem, transparent calc(0.08rem + 0.5px));
    opacity: 0;
  }

  .theme-toggle[aria-pressed="true"] {
    box-shadow: inset 0 1px 3px oklch(10% 0.03 290 / 0.6), 0 0 0 1px oklch(100% 0 0 / 0.1), 0 6px 14px -8px var(--shadow-tint-strong);
  }

  .theme-toggle[aria-pressed="true"]::before,
  .theme-toggle[aria-pressed="true"] .theme-toggle-knob::before {
    opacity: 1;
  }

  .theme-toggle[aria-pressed="true"]::after {
    opacity: 0;
    transform: translateY(0.75rem);
  }

  .theme-toggle[aria-pressed="true"] .theme-toggle-knob {
    translate: calc(var(--largura) - var(--altura)) 0;
    rotate: 1turn;
    background: oklch(95% 0.015 85);
    box-shadow: 0 0 0 0.25rem oklch(95% 0.02 85 / 0.08), 0 0 0.75rem oklch(95% 0.02 85 / 0.35), inset -0.125rem -0.15rem 0 oklch(84% 0.02 80);
  }

  .theme-toggle:focus-visible {
    outline-offset: 3px;
  }

  @media (max-width: 30rem) {
    .header-link {
      justify-content: center;
      width: 2.75rem;
      padding: 0;
      font-size: 0;
      gap: 0;
    }

    .header-link::before {
      width: 1.125rem;
      height: 1.125rem;
    }
  }
}

@layer enhancements {
  @media (prefers-reduced-motion: no-preference) {
    .theme-toggle-knob {
      transition: translate 0.7s var(--ease-spring), rotate 0.7s var(--ease-out), scale 0.3s var(--ease-spring), background-color 0.4s, box-shadow 0.5s var(--ease-out);
    }

    .theme-toggle::before,
    .theme-toggle-knob::before {
      transition: opacity 0.5s var(--ease-out);
    }

    .theme-toggle::after {
      transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
    }

    .theme-toggle:active .theme-toggle-knob {
      scale: 0.88;
    }
  }

  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .theme-toggle:hover .theme-toggle-knob {
      scale: 1.1;
    }
  }
}

@layer components {
  .brand-mark .brilhos path {
    transform-box: fill-box;
    transform-origin: center;
    scale: 0;
  }

  .brilhos path:nth-child(2) {
    --atraso: 0.3s;
  }

  .brilhos path:nth-child(3) {
    --atraso: 0.6s;
  }
}

@layer enhancements {
  @media (prefers-reduced-motion: no-preference) {
    .brand:is(:hover, :focus-visible) .brilhos,
    .about-avatar:hover .brilhos {
      opacity: 1;
    }

    .brand:is(:hover, :focus-visible) .brilhos path,
    .about-avatar:hover .brilhos path {
      animation: brilhar 1.4s var(--ease-out) var(--atraso, 0s) infinite both;
    }

    .sad-cart .carrinho {
      animation: suspiro 3.6s ease-in-out 0.5s infinite;
    }

    .sad-cart .lagrima {
      animation: lagrima 3.6s ease-in 0.5s infinite both;
    }
  }
}

@keyframes suspiro {
  0%,
  60%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }

  30% {
    translate: 0 1.5px;
    rotate: 2deg;
  }
}

@keyframes lagrima {
  0% {
    scale: 0.3;
    translate: 0 0;
    opacity: 0;
  }

  20%,
  55% {
    scale: 1;
    translate: 0 0;
    opacity: 1;
  }

  85%,
  100% {
    scale: 0.8;
    translate: 0 14px;
    opacity: 0;
  }
}

@keyframes brilhar {
  0% {
    scale: 0;
    rotate: -45deg;
  }

  30% {
    scale: 1.15;
    rotate: 0deg;
  }

  50% {
    scale: 1;
  }

  75%,
  100% {
    scale: 0;
    rotate: 45deg;
  }
}
