@layer reset, base, layout, components, legal, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p { margin: 0; }
  button, input, select { font: inherit; }
  button, a, input, select { -webkit-tap-highlight-color: transparent; }
  a { color: inherit; text-decoration: none; }
  button { color: inherit; cursor: pointer; }
  button, select { touch-action: manipulation; }
  svg { flex-shrink: 0; }
  [hidden] { display: none !important; }
}

@layer base {
  :root { color-scheme: light; --paper: #f7f7f2; --white: #fff; --ink: #232a28; --muted: #666e68; --line: #dfe2da; --accent: #c6502c; --soft-accent: #f8eee6; --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif; }
  html { scroll-behavior: smooth; scroll-padding-top: 30px; }
  body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
  ::selection { background: #f3ceb9; color: #232a28; }
  :focus-visible { outline: 3px solid #b94a28; outline-offset: 4px; border-radius: 3px; }
  .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; }
  .skip-link { position: fixed; z-index: 20; top: -100px; left: 20px; padding: 12px 20px; background: var(--ink); color: white; }
  .skip-link:focus { top: 12px; }
  .eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.6px; }
  .icon { display: inline-block; vertical-align: middle; }
}

@layer layout {
  .site-header { height: 89px; border-bottom: 1px solid var(--line); }
  .header-inner, .footer-inner, .page-shell { max-width: 1440px; margin: 0 auto; padding-left: 64px; padding-right: 64px; }
  .header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
  .brand { display: inline-flex; gap: 10px; align-items: center; font-size: 28px; font-weight: 720; letter-spacing: -1.4px; }
  .logo-period { color: var(--accent); }
  .logo-mark { display: grid; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 3px; transform: rotate(-7deg); }
  .logo-mark i { display: block; background: var(--ink); border-radius: 1.5px; }
  .logo-mark i:nth-child(2) { background: var(--accent); }
  .top-nav { display: flex; gap: 30px; margin-right: auto; margin-left: 44px; font-size: 13px; color: var(--muted); }
  .top-nav a { position: relative; padding: 10px 0; }
  .top-nav a:hover { color: var(--ink); }
  .top-nav .current { color: var(--ink); }
  .top-nav .current::after { content: ''; position: absolute; height: 3px; width: 3px; border-radius: 50%; background: var(--accent); bottom: 1px; left: 50%; }
  .header-count { display: flex; align-items: center; gap: 9px; font-size: 10px; color: var(--muted); }
  .header-count .icon { width: 14px; height: 14px; margin-left: 5px; }
  .status-dot { width: 5px; height: 5px; background: #708865; border-radius: 50%; }
  .hero { display: grid; grid-template-columns: 1.12fr 1fr; gap: 40px; align-items: center; min-height: 420px; padding: 42px 0; }
  .hero-copy { padding-left: 1px; }
  .hero .eyebrow { display: flex; align-items: center; gap: 8px; color: #5d645d; }
  .small-cross { font-size: 20px; line-height: 1; color: var(--accent); }
  .hero h1 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif; font-weight: 500; font-size: clamp(58px, 6.3vw, 88px); letter-spacing: -3.7px; line-height: 1.015; margin: 22px 0 20px; }
  .hero h1 em { font-weight: 400; color: var(--accent); }
  .hero-description { font-size: 14px; line-height: 1.85; color: var(--muted); }
  .hero-link { display: inline-flex; gap: 27px; align-items: center; margin-top: 24px; font-size: 12px; font-weight: 600; }
  .hero-link span { width: 25px; height: 25px; border: 1px solid #c9cec4; border-radius: 50%; display: grid; place-items: center; transition: transform .2s; }
  .hero-link:hover span { transform: translateY(3px); }
  .directory-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 43px; padding: 45px 0 50px; border-top: 1px solid var(--line); align-items: start; }
  .directory-sidebar { position: sticky; top: 28px; }
  .sidebar-label { font-size: 9px; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; padding: 4px 9px 24px; }
  .category-nav { display: flex; flex-direction: column; gap: 5px; }
  .saved-nav { margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
  .sidebar-note { border: 1px solid var(--line); margin: 35px 9px 0; padding: 20px 15px; background: #efefe8; }
  .sidebar-note p { font-size: 13px; font-weight: 600; line-height: 1.7; margin: 11px 0 10px; }
  .sidebar-note > span:last-child { font-size: 10px; line-height: 1.7; color: var(--muted); display: block; }
  .note-symbol { color: var(--accent); font-size: 25px; }
  .directory-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 24px; }
  .directory-heading .eyebrow { color: var(--muted); font-size: 9px; letter-spacing: 1.3px; margin: 4px 0 8px; }
  .directory-heading h2 { font-size: 30px; letter-spacing: -1.15px; font-weight: 550; line-height: 1.3; }
  .heading-dot { color: var(--accent); }
  .collection-total { font-size: 10px; color: var(--muted); padding-bottom: 6px; white-space: nowrap; }
  .collection-total span { color: #afb5aa; margin: 0 7px; }
  .directory-controls { display: flex; gap: 12px; }
  .results-bar { display: flex; justify-content: space-between; align-items: center; min-height: 53px; gap: 12px; color: var(--muted); font-size: 10px; }
  .app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
  .about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 51px 0 60px; border-top: 1px solid var(--line); }
  .about-section .eyebrow { font-size: 9px; color: var(--muted); }
  .about-section h2 { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 39px; letter-spacing: -1.1px; font-weight: 400; line-height: 1.2; margin-top: 16px; }
  .about-copy { padding-top: 20px; color: var(--muted); line-height: 1.9; font-size: 13px; max-width: 485px; }
  .about-copy p + p { margin-top: 12px; }
  .about-copy a { display: inline-flex; align-items: center; gap: 28px; color: var(--ink); font-weight: 600; font-size: 11px; margin-top: 20px; }
  .site-footer { border-top: 1px solid var(--line); }
  .footer-inner { min-height: 103px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding-top: 24px; padding-bottom: 24px; }
  .footer-inner .brand { font-size: 22px; }
  .footer-inner .logo-mark { grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 2px; }
  .footer-inner p { color: var(--muted); font-size: 11px; }
  .footer-inner > span { font-size: 8px; letter-spacing: 1.4px; margin-left: auto; color: var(--muted); }
  .footer-links { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-left: auto; font-size: 11px; color: #596253; }
  .footer-links a { padding: 7px 0; }
  .footer-links a:hover, .footer-links a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
  .footer-contact { overflow-wrap: anywhere; }
  .footer-meta { display: flex; justify-content: space-between; gap: 15px; max-width: 1440px; margin: 0 auto; padding: 0 64px 24px; color: var(--muted); font-size: 10px; line-height: 1.8; }
  .footer-meta a { text-decoration: underline; text-underline-offset: 3px; }
}

@layer components {
  .collection-art { position: relative; width: 100%; max-width: 460px; height: 340px; justify-self: end; }
  .art-grid { position: absolute; inset: 6px; background-image: radial-gradient(#b6bead 1px, transparent 1px); background-size: 19px 19px; mask-image: radial-gradient(ellipse, #000 32%, transparent 72%); opacity: .5; }
  .art-orbit { position: absolute; border: 1px solid #dbdfd3; border-radius: 50%; left: 50%; top: 48%; transform: translate(-50%, -50%); }
  .orbit-one { width: 270px; height: 270px; }
  .orbit-two { width: 385px; height: 215px; transform: translate(-50%, -50%) rotate(-30deg); }
  .art-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: #b9c1af; }
  .art-center { position: absolute; left: 50%; top: 50%; width: 157px; height: 74px; transform: translate(-50%, -50%) rotate(-4deg); background: #e6eddb; border: 1px solid #cfd9bf; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 23px; font-weight: 650; letter-spacing: -1px; box-shadow: 4px 6px 0 #e5e7df; }
  .art-center .logo-mark { grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 2px; }
  .art-tile { position: absolute; width: 106px; height: 105px; border: 1px solid #dce0d4; background: #fffffb; border-radius: 11px; display: flex; flex-direction: column; padding: 16px; gap: 11px; box-shadow: 2px 5px 0 #eceee5; }
  .art-tile .icon { width: 26px; height: 26px; }
  .art-tile span { font-size: 10px; font-weight: 550; }
  .art-tile b { position: absolute; right: 13px; top: 17px; font-weight: 400; font-size: 8px; color: #747c6e; }
  .tile-science { left: 7%; top: 6%; transform: rotate(-9deg); color: #4f6c4b; }
  .tile-math { right: 5%; top: 3%; transform: rotate(8deg); color: #a66a3a; }
  .tile-home { left: 5%; bottom: 3%; transform: rotate(5deg); color: #52727c; }
  .tile-learn { right: 9%; bottom: 1%; transform: rotate(-7deg); color: #88709e; }
  .art-caption { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 7px; letter-spacing: 2px; color: var(--muted); }
  .art-plus { position: absolute; color: #959e89; font-size: 19px; font-weight: 300; }
  .plus-one { left: 44%; top: 8%; }
  .plus-two { right: 2%; bottom: 33%; }
  .category-button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 9px; border: 1px solid transparent; border-radius: 5px; background: none; text-align: left; font-size: 12px; color: #60695f; transition: background .15s; }
  .category-button .icon { width: 16px; height: 16px; }
  .category-button:hover { background: #efefe6; }
  .category-button.active { background: #e9eddc; color: #33432d; font-weight: 600; }
  .category-button .category-count { font-size: 10px; margin-left: auto; font-weight: 400; color: #687160; }
  .search-field { position: relative; display: flex; align-items: center; background: white; border: 1px solid #d8ddd1; border-radius: 5px; min-height: 47px; flex: 1; min-width: 0; }
  .search-field:focus-within { border-color: #849272; box-shadow: 0 0 0 2px #e4e8dc; }
  .search-field > .icon { width: 17px; height: 17px; margin-left: 15px; color: #747d6f; }
  .search-field input { border: 0; background: none; outline: none; min-width: 0; width: 100%; font-size: 13px; padding: 13px 40px 13px 11px; color: var(--ink); }
  .search-field input::placeholder { color: #7b8277; opacity: 1; }
  .search-field input::-webkit-search-cancel-button { display: none; }
  .search-field kbd { position: absolute; right: 13px; top: 13px; border: 1px solid #dfe3d8; color: #717b68; border-radius: 3px; height: 19px; width: 19px; display: grid; place-items: center; font: 10px var(--sans); }
  .search-field.has-query kbd { display: none; }
  .clear-search { position: absolute; right: 4px; width: 38px; height: 38px; padding: 9px; border: none; background: transparent; }
  .clear-search .icon { width: 17px; height: 17px; }
  .sort-field { position: relative; flex-shrink: 0; }
  .sort-field select { appearance: none; border: 1px solid #d8ddd1; border-radius: 5px; background: transparent; padding: 0 35px 0 14px; height: 47px; color: #535d50; font-size: 11px; cursor: pointer; }
  .sort-field .icon { width: 15px; height: 15px; position: absolute; right: 11px; top: 16px; pointer-events: none; color: #727d6a; }
  .reset-button { background: none; border: none; padding: 9px 0 9px 9px; font-size: 10px; color: #825734; }
  .reset-button span { margin-left: 6px; }
  .app-card { --category-ink: #4f6b4e; --category-wash: #eef3e8; position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 21px 20px 0; border: 1px solid #dde1d7; border-radius: 7px; background: var(--white); transition: transform .2s, box-shadow .2s, border-color .2s; }
  .category-math { --category-ink: #87643d; --category-wash: #f8f0e2; }
  .category-health { --category-ink: #9a5b5f; --category-wash: #f8ecee; }
  .category-engineering { --category-ink: #4f707d; --category-wash: #eaf1f4; }
  .category-money { --category-ink: #5b7150; --category-wash: #edf2e8; }
  .category-developer { --category-ink: #6d5e8a; --category-wash: #f0edf7; }
  .category-everyday { --category-ink: #8a6b44; --category-wash: #f6f0e6; }
  .app-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px #253b2410; border-color: #bcc9af; }
  .card-top { display: flex; align-items: start; justify-content: space-between; }
  .app-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--category-wash); color: var(--category-ink); }
  .app-icon .icon { width: 23px; height: 23px; }
  .save-button { width: 32px; height: 32px; margin: -5px -8px 0 0; background: transparent; border: none; display: grid; place-items: center; border-radius: 50%; color: #9aa195; }
  .save-button .icon { width: 17px; height: 17px; }
  .save-button:hover { background: #f7f1e5; color: #93703e; }
  .save-button.is-saved { color: #956821; }
  .save-button.is-saved .icon { fill: #f4dea8; }
  .card-category { margin-top: 18px; color: var(--category-ink); font-size: 9px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; }
  .app-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -.5px; margin-top: 5px; line-height: 1.5; }
  .app-card h3 a { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .app-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 7px; }
  .save-button, .card-domain { position: relative; z-index: 1; }
  .title-arrow { width: 15px; height: 15px; opacity: 0; color: var(--category-ink); transition: opacity .2s; }
  .app-card:hover .title-arrow, .app-card:focus-within .title-arrow { opacity: 1; }
  .card-description { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 9px 0 15px; }
  .card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; padding-bottom: 19px; }
  .card-tags span { font-size: 10px; border: 1px solid #e5e7df; color: #6b7464; border-radius: 3px; padding: 3px 6px; line-height: 1.3; }
  .card-domain { border-top: 1px solid #eceee8; display: flex; justify-content: space-between; align-items: center; gap: 5px; min-height: 40px; font-size: 10px; color: #687260; }
  .card-domain span { overflow-wrap: anywhere; }
  .card-domain .icon { width: 12px; height: 12px; }
  .card-domain:hover { color: var(--ink); }
  .directory-end { display: flex; gap: 18px; align-items: center; justify-content: center; color: #858d7e; font-size: 7px; letter-spacing: 1.3px; margin-top: 35px; }
  .directory-end span { height: 1px; background: var(--line); width: 36px; }
  .empty-state { text-align: center; border: 1px dashed #c8d0be; border-radius: 8px; padding: 65px 22px; background: #f0f2e9; }
  .empty-state > .icon { color: #758267; width: 33px; height: 33px; margin-bottom: 15px; }
  .empty-state h3 { font-size: 22px; font-weight: 550; letter-spacing: -.6px; }
  .empty-state p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 12px auto 20px; max-width: 340px; }
  .empty-state button { border: 1px solid #bfc9b4; background: white; padding: 12px 17px; border-radius: 5px; font-size: 11px; }
  .empty-state button span { margin-left: 15px; }
  .noscript-note { background: #eeeede; padding: 15px; margin-bottom: 15px; font-size: 12px; line-height: 1.7; }
}

@layer legal {
  .legal-document { padding-top: 57px; padding-bottom: 70px; }
  .legal-heading { max-width: 880px; padding-bottom: 38px; }
  .legal-heading .eyebrow { color: var(--muted); font-size: 10px; }
  .legal-heading h1 { font: 400 clamp(44px, 5vw, 66px)/1.1 "Iowan Old Style", "Palatino Linotype", Georgia, serif; letter-spacing: -1.8px; margin: 21px 0 18px; }
  .legal-introduction { max-width: 650px; font-size: 15px; line-height: 1.85; color: var(--muted); }
  .legal-date { font-size: 11px; margin-top: 22px; color: #6c7465; }
  .legal-layout { display: grid; grid-template-columns: 215px minmax(0, 760px); gap: 55px; border-top: 1px solid var(--line); padding-top: 35px; align-items: start; }
  .legal-sidebar { position: sticky; top: 25px; }
  .legal-navigation { display: flex; flex-direction: column; gap: 7px; }
  .legal-navigation a { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 5px; padding: 12px 13px; font-size: 12px; color: #596253; }
  .legal-navigation a:hover { background: #efefe6; }
  .legal-navigation a[aria-current] { background: #e9eddc; color: #33432d; font-weight: 600; }
  .legal-contact { padding: 24px 13px; border-top: 1px solid var(--line); margin-top: 22px; line-height: 1.8; }
  .legal-contact .eyebrow { font-size: 8px; letter-spacing: 1px; color: var(--muted); }
  .legal-contact p + p { margin-top: 11px; font-size: 14px; }
  .legal-contact a { display: inline-block; color: #915034; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; overflow-wrap: anywhere; }
  .legal-back { display: inline-block; padding: 8px 13px; color: #626d59; font-size: 11px; }
  .legal-content { min-width: 0; font-size: 15px; line-height: 1.85; }
  .legal-content a { color: #954427; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
  .legal-content a:hover { color: #622b17; }
  .analytics-settings-button { padding: 10px 16px; border: 1px solid #164c3c; border-radius: 6px; color: #fff; background: #164c3c; font: inherit; cursor: pointer; }
  .analytics-settings-button:disabled { opacity: .55; cursor: wait; }
  .analytics-settings-button:focus-visible { outline: 3px solid #c76a3d; outline-offset: 3px; }
  .analytics-settings-status { display: block; font-size: 13px; color: var(--muted); }
  .legal-summary { padding: 22px 25px; background: #edf1e4; border: 1px solid #d9e1cd; border-radius: 6px; font-size: 14px; color: #47533e; }
  .legal-toc { border-bottom: 1px solid var(--line); padding: 19px 0; margin-bottom: 32px; font-size: 13px; }
  .legal-toc summary { cursor: pointer; font-weight: 600; color: #4b5741; padding: 4px 0; }
  .legal-toc ol { padding-left: 20px; margin: 14px 0 0; }
  .legal-toc li { padding: 4px 0; }
  .legal-section { margin-top: 31px; }
  .legal-section h2 { scroll-margin-top: 30px; font-size: 22px; font-weight: 550; line-height: 1.45; letter-spacing: -.4px; margin-bottom: 13px; }
  .legal-section p { color: #515b4e; }
  .legal-section p + p { margin-top: 15px; }
  .legal-table-wrap { margin: 24px 0; }
  .legal-table-wrap table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; line-height: 1.8; }
  .legal-table-wrap caption { text-align: left; font-weight: 600; padding-bottom: 11px; color: #435039; }
  .legal-table-wrap th, .legal-table-wrap td { text-align: left; vertical-align: top; border: 1px solid #dce1d4; padding: 12px; overflow-wrap: anywhere; }
  .legal-table-wrap thead th { background: #edf0e6; font-weight: 600; }
  .legal-table-wrap tbody th { background: #f1f3eb; font-weight: 500; }
  .legal-document-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 21px; font-size: 12px; }
}

@layer responsive {
  @media (min-width: 1500px) { .hero { min-height: 480px; } }
  @media (max-width: 1200px) {
    .header-inner, .footer-inner, .page-shell { padding-left: 38px; padding-right: 38px; }
    .footer-meta { padding-left: 38px; padding-right: 38px; }
    .legal-layout { gap: 35px; grid-template-columns: 195px minmax(0, 760px); }
    .directory-layout { gap: 28px; grid-template-columns: 190px minmax(0, 1fr); }
    .category-button { font-size: 10px; gap: 8px; }
    .app-card { padding-left: 16px; padding-right: 16px; }
    .app-card h3 { font-size: 15px; }
    .header-count { display: none; }
    .top-nav { margin-left: auto; margin-right: 0; }
  }
  @media (max-width: 1000px) {
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: 400px; gap: 20px; }
    .hero h1 { font-size: 70px; }
    .collection-art { transform: scale(.87); transform-origin: center right; }
    .collection-total { display: none; }
    .app-card { min-height: 275px; }
  }
  @media (max-width: 760px) {
    .header-inner, .footer-inner, .page-shell { padding-left: 24px; padding-right: 24px; }
    .footer-meta { padding-left: 24px; padding-right: 24px; }
    .site-header { height: 76px; }
    .brand { font-size: 26px; }
    .top-nav { gap: 18px; font-size: 11px; }
    .hero { padding: 45px 0; min-height: 370px; grid-template-columns: 1.15fr 1fr; gap: 0; overflow: hidden; }
    .hero h1 { font-size: 62px; letter-spacing: -2.8px; }
    .hero-description { font-size: 12px; }
    .hero .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
    .collection-art { min-width: 290px; height: 290px; transform: scale(.82); transform-origin: center right; margin-left: -20px; }
    .art-tile { width: 83px; height: 87px; padding: 13px; }
    .art-center { width: 126px; height: 61px; font-size: 19px; }
    .art-center .logo-mark { grid-template-columns: repeat(2, 5px); grid-template-rows: repeat(2, 5px); }
    .art-tile b { display: none; }
    .orbit-one { width: 220px; height: 220px; }
    .orbit-two { width: 270px; height: 200px; }
    .directory-layout { display: block; padding-top: 28px; }
    .directory-sidebar { position: static; margin-bottom: 30px; }
    .sidebar-label, .sidebar-note { display: none; }
    .category-nav { display: flex; flex-flow: row wrap; gap: 6px; }
    .category-button { width: auto; padding: 9px 11px; font-size: 11px; min-height: 40px; border-color: var(--line); background: #fafaf6; }
    .category-button .category-count { margin-left: 4px; }
    .category-button .icon { width: 14px; height: 14px; }
    .category-button.active { border-color: #c9d2bd; }
    .saved-nav { border: none; margin: 8px 0 0; padding: 0; }
    .saved-nav .category-button { border-color: transparent; padding-left: 0; }
    .saved-nav .category-button.active { padding-left: 11px; }
    .app-card { padding-left: 20px; padding-right: 20px; }
    .about-section { gap: 30px; }
    .about-section h2 { font-size: 32px; }
    .about-copy { font-size: 12px; }
    .footer-inner { gap: 22px; flex-wrap: wrap; padding-top: 23px; padding-bottom: 23px; }
    .footer-inner > span { display: none; }
    .footer-links { width: 100%; margin-left: 0; font-size: 12px; }
    .legal-document { padding-top: 38px; padding-bottom: 48px; }
    .legal-heading { padding-bottom: 28px; }
    .legal-layout { display: block; padding-top: 20px; }
    .legal-sidebar { position: static; margin-bottom: 23px; }
    .legal-navigation { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .legal-navigation a { border: 1px solid var(--line); font-size: 11px; padding: 10px 12px; }
    .legal-contact, .legal-back { display: none; }
    .legal-content { font-size: 14px; }
    .legal-section h2 { font-size: 21px; }
  }
  @media (max-width: 520px) {
    .header-inner, .footer-inner, .page-shell { padding-left: 20px; padding-right: 20px; }
    .footer-meta { padding-left: 20px; padding-right: 20px; flex-direction: column; gap: 4px; }
    .top-nav a:first-child { display: none; }
    .top-nav a { font-size: 10px; }
    .hero { display: block; padding: 44px 0 36px; }
    .hero h1 { font-size: 68px; line-height: 1.04; }
    .hero-description { font-size: 13px; max-width: 315px; }
    .hero-link { margin-top: 19px; }
    .collection-art { display: none; }
    .directory-layout { padding-top: 24px; }
    .category-nav { gap: 6px; }
    .category-button { font-size: 10px; padding: 8px 9px; gap: 7px; min-height: 36px; }
    .category-button .category-count { display: none; }
    .saved-nav .category-count { display: inline; }
    .directory-heading h2 { font-size: 29px; }
    .directory-heading { margin-bottom: 19px; }
    .directory-controls { gap: 8px; }
    .search-field input { font-size: 12px; padding-left: 8px; }
    .search-field > .icon { margin-left: 11px; width: 15px; height: 15px; }
    .sort-field select { width: 104px; padding-left: 10px; padding-right: 26px; font-size: 10px; }
    .sort-field .icon { right: 7px; }
    .app-grid { grid-template-columns: 1fr; gap: 13px; }
    .app-card { min-height: 272px; padding: 21px 22px 0; }
    .app-card h3 { font-size: 19px; letter-spacing: -.6px; }
    .card-description { font-size: 13px; line-height: 1.8; }
    .card-category { font-size: 9px; margin-top: 16px; }
    .card-tags span { font-size: 9px; }
    .card-domain { font-size: 10px; min-height: 44px; }
    .save-button { width: 38px; height: 38px; }
    .save-button .icon { width: 19px; height: 19px; }
    .title-arrow { opacity: 1; }
    .about-section { display: block; padding: 38px 0 42px; }
    .about-section h2 { font-size: 37px; }
    .about-copy { font-size: 13px; padding-top: 22px; }
    .directory-end { font-size: 6px; gap: 10px; letter-spacing: 1px; }
    .footer-inner { flex-direction: column; align-items: start; gap: 10px; }
    .footer-inner p { font-size: 10px; }
    .footer-links { gap: 8px 18px; font-size: 11px; }
    .footer-contact { width: 100%; }
    .legal-heading h1 { font-size: 46px; letter-spacing: -1.5px; }
    .legal-introduction { font-size: 14px; }
    .legal-summary { padding: 18px; font-size: 13px; }
    .legal-table-wrap table { font-size: 11px; }
    .legal-table-wrap th, .legal-table-wrap td { padding: 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
  }
}
