:root {
  color-scheme: light;
  --dark: #161717;
  --paper: #f7f7f4;
  --ink: #222322;
  --quiet: #535653;
  --line: #dedfda;
  --lime: #e4ff72;
  --purple: #e9e1fa;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7650d3; outline-offset: 4px; }
.frame { width: min(1150px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; left: -1000px; }
.skip:focus { left: 10px; top: 10px; z-index: 2; background: white; padding: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.top, .hero { background: var(--dark); color: white; }
.top { border-bottom: 1px solid #373938; }
.top-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 75px; }
.brand { display: inline-flex; align-items: center; font-size: 1.25rem; letter-spacing: -.045em; font-weight: 800; white-space: nowrap; }
.top .brand > span:not(.logo), footer .brand > span:not(.logo) { color: var(--lime); }
.logo { display: inline-grid; place-items: center; margin-right: 8px; background: var(--lime); color: var(--dark); border-radius: 8px; width: 34px; height: 34px; font-size: 1.45rem; }
nav { display: flex; flex-wrap: wrap; gap: 25px; }
nav a { color: #e2e3de; font-size: .92rem; }
nav a:hover, footer a:hover { color: var(--lime); }
.top-search { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #4a4d4a; border-radius: 50%; font-size: 1.5rem; }
.hero { overflow: hidden; }
.hero-inner { min-height: 420px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; }
.hero-copy { padding-block: 52px 58px; z-index: 1; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.038em; }
.hero h1 { font-size: clamp(3.15rem, 6.7vw, 6.1rem); line-height: .99; margin-bottom: 21px; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero p { max-width: 430px; color: #dedfd9; margin-bottom: 27px; }
.search-form { display: flex; padding: 6px; align-items: center; gap: 8px; border-radius: 13px; background: white; max-width: 465px; color: #454644; }
.search-form span { padding-inline: 8px 0; font-size: 1.45rem; }
.search-form input { border: 0; color: var(--ink); min-width: 0; flex: 1; padding: 10px 2px; background: white; }
button, .button { border: 1px solid transparent; background: var(--dark); color: white; border-radius: 9px; padding: 9px 15px; cursor: pointer; font-weight: 650; }
button:hover, .button:hover { background: #353735; }
button:disabled { cursor: default; opacity: .6; }
.search-form button { background: var(--lime); color: var(--dark); }
.search-form button:hover { background: #d2ec60; }
.hero-art { min-height: 340px; position: relative; }
.art-orbit { display: block; width: 91%; height: 74%; border: 1px solid #636656; border-radius: 48%; position: absolute; left: 3%; top: 13%; transform: rotate(-24deg); }
.art-orbit.inner { transform: rotate(18deg); width: 78%; left: 9%; top: 16%; }
.art-tile { position: absolute; display: grid; place-items: center; border-radius: 23%; color: #242321; font-weight: 800; box-shadow: 10px 14px 0 #0b0c0b; aspect-ratio: 1; line-height: 1; }
.art-one { background: #e4ff72; width: 32%; font-size: clamp(3rem, 6vw, 5.5rem); left: 27%; top: 11%; transform: rotate(-12deg); }
.art-two { background: #bfa5fb; width: 24%; font-size: clamp(2.8rem, 4vw, 4rem); right: 13%; top: 43%; transform: rotate(17deg); }
.art-three { background: #ffc4a6; width: 21%; font-size: clamp(2rem, 4vw, 3.8rem); left: 14%; bottom: 15%; transform: rotate(-16deg); }
.art-plus, .art-dot { position: absolute; color: var(--lime); font-size: 2rem; }
.art-plus.a { right: 12%; top: 11%; }
.art-plus.b { left: 7%; top: 27%; }
.art-dot { width: 9px; height: 9px; background: #f6d8fa; border-radius: 50%; right: 27%; bottom: 10%; }
.home-body, .listing, .feature { padding-block: 44px 70px; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); margin-bottom: 20px; }
.categories, .cards { display: grid; gap: 14px; }
.categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tools { --tint: #e9e1fa; --accent: #4b2d79; }
.calculators { --tint: #e8f2ce; --accent: #3b5527; }
.games { --tint: #ffe1d2; --accent: #713c25; }
.quizzes { --tint: #dceaf9; --accent: #294f77; }
.generators { --tint: #f6e0ec; --accent: #723759; }
.category, .card { border: 1px solid var(--line); background: white; border-radius: 13px; }
.category:hover, .card:hover { border-color: #8a8983; box-shadow: 0 4px 10px #1212120b; }
.category { display: grid; padding: 15px; align-content: start; gap: 5px; }
.category strong, .card strong { font-size: 1.05rem; }
.category > span:last-child, .card-text > span { color: var(--quiet); font-size: .9rem; }
.tile-icon { background: var(--tint, var(--purple)); color: var(--accent, var(--ink)); display: inline-grid; place-items: center; font-size: 1.35rem; font-weight: 800; border-radius: 9px; width: 42px; height: 42px; }
.category .tile-icon { margin-bottom: 8px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 38px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading a, .back { text-decoration: underline; text-underline-offset: 4px; font-weight: 650; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; align-items: flex-start; gap: 12px; padding: 15px; }
.card .tile-icon { flex: 0 0 42px; }
.card-text { display: grid; flex: 1; }
.card-open { color: var(--quiet); margin-left: auto; }
footer { color: white; background: var(--dark); }
.footer-inner > div { display: flex; gap: 18px; }
.listing h1, .feature h1 { font-size: clamp(2.05rem, 4.9vw, 3.65rem); margin: 12px 0; }
.listing-intro { margin: 23px 0; }
.intro, .listing-intro p { color: var(--quiet); margin-bottom: 25px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 16px; padding: clamp(17px, 4vw, 32px); max-width: 850px; }
.feature-guide { max-width: 70ch; margin-top: 36px; }
.feature-guide section + section { margin-top: 25px; }
.feature-guide h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); margin-bottom: 10px; }
.feature-guide p { margin-bottom: 0; }
.related { margin-top: 34px; }
.article { min-height: 55vh; }
.article p { max-width: 65ch; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(205px, 100%), 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; padding-bottom: 11px; }
.field > span { font-weight: 650; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: 43px; border: 1px solid #a9aba6; border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); }
.field input[type="color"] { padding: 4px 7px; }
.field select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23222322' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.field textarea { resize: vertical; min-height: 120px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.secondary { background: #eceee9; color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #dce0d7; }
.result { display: block; margin: 14px 0 0; padding: 14px; background: var(--paper); border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result:empty { display: none; }
.result.error { color: #8c2222; }
.help { color: var(--quiet); font-size: .94rem; margin-bottom: 13px; }
.preview-image { display: block; max-width: 100%; max-height: 350px; margin-block: 12px; object-fit: contain; }
.prompt { padding: 14px; background: var(--tint, var(--paper)); border-radius: 9px; font-size: 1.15rem; overflow-wrap: anywhere; }
.game-score { font-weight: 700; min-height: 1.5em; margin-bottom: 10px; }
.arcade-field { display: grid; justify-items: center; min-height: 166px; margin-bottom: 14px; padding: 8px; border-bottom: 4px solid #7c4c34; overflow: hidden; background: #f6efe9; border-radius: 9px 9px 0 0; }
.arcade-word { align-self: start; font-size: 1.3rem; font-weight: 750; margin: 0; padding: 4px 12px; background: #ffe1d2; border-radius: 7px; }
.arcade-word:empty, .prompt:empty { display: none; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 400px); gap: 8px; }
.game-grid button, .game-grid input { aspect-ratio: 1; width: 100%; text-align: center; font-size: 1.1rem; }
.game-grid input { border: 1px solid #9b9d97; border-radius: 7px; background: white; color: var(--ink); min-width: 0; padding: 0; }
.game-grid input:read-only { background: #e9e4f6; font-weight: 750; }
.game-grid button.revealed { background: #e8f2ce; color: var(--ink); opacity: 1; }
.quiz-choices { display: grid; gap: 8px; }
.quiz-choices button { text-align: left; }
.quiz-choices .correct { background: #d6efc9; }
.quiz-choices .incorrect { background: #f9d9d4; }
.wheel { width: 180px; aspect-ratio: 1; border: 6px solid var(--dark); border-radius: 50%; margin: 8px 0 14px 20px; transition: transform 1s ease-out; }
.wheel-wrap { position: relative; }
.wheel-wrap::before { content: "▼"; position: absolute; z-index: 1; left: 102px; top: -19px; font-size: 1.3rem; }
.file-list { font-size: .94rem; margin-block: 5px 10px; padding-left: 23px; }
@media (max-width: 780px) {
  .top-inner { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  nav { order: 3; width: 100%; gap: 8px 18px; }
  .hero-inner { grid-template-columns: 1.2fr .8fr; min-height: auto; }
  .hero-art { min-height: 230px; }
  .categories, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 510px) {
  .frame { width: calc(100% - 28px); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { padding: 34px 0 24px; }
  .hero-art { min-height: 160px; width: min(85%, 310px); margin: 0 auto 15px; }
  .art-tile { width: 21%; }
  .art-one { left: 36%; font-size: 2.9rem; }
  .art-two { right: 16%; font-size: 2.2rem; }
  .art-three { left: 17%; bottom: 17%; font-size: 2.1rem; }
  .cards { grid-template-columns: 1fr; }
  .section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
