:root {
  --ink: #111827;
  --muted: #667085;
  --line: #d6dde8;
  --paper: #fffaf0;
  --panel: #ffffff;
  --yellow: #ffd429;
  --blue: #0074d9;
  --mint: #29d3a2;
  --pink: #ff6b9a;
  --shadow: 5px 5px 0 #111827;
}

/* SEO/AIO support sections for the 2026 refresh */
.answer-stack,
.update-plan {
  width: min(1120px, calc(100% - 36px));
  margin: 42px auto;
  border: 4px solid var(--ink);
  background: #fff8d7;
  box-shadow: 8px 8px 0 rgba(20, 26, 34, 0.45);
}

.answer-stack {
  padding: clamp(22px, 3vw, 34px);
}

.answer-stack h2,
.update-plan h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
}

.answer-stack p,
.update-plan p {
  color: #354052;
  line-height: 1.9;
}

.answer-stack dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.answer-stack div {
  padding: 18px;
  border: 3px solid var(--ink);
  background: #fffef1;
}

.answer-stack dt {
  margin-bottom: 8px;
  font-weight: 950;
}

.answer-stack dd {
  margin: 0;
  color: #354052;
  line-height: 1.8;
}

.compact-answer {
  margin-top: 28px;
  margin-bottom: 30px;
}

.compact-answer h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.compact-answer p {
  max-width: 720px;
  margin: 0;
}

.compact-answer dl {
  gap: 10px;
}

.compact-answer div {
  padding: 14px 16px;
}

.compact-answer dd {
  font-size: 14px;
}

.update-plan {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
}

.update-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 3px solid rgba(20, 26, 34, 0.2);
  line-height: 1.7;
}

.update-list li:last-child {
  border-bottom: 0;
}

.update-list strong {
  color: #5c7300;
}

@media (max-width: 820px) {
  .answer-stack dl,
  .update-plan {
    grid-template-columns: 1fr;
  }

  .update-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background:
    linear-gradient(rgba(0, 116, 217, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 116, 217, .045) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  line-height: 1.7;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(255, 250, 240, .96);
  border-bottom: 3px solid var(--ink);
}

.brand {
  font-weight: 900;
  text-decoration: none;
  line-height: 1.1;
  font-size: 20px;
}

.brand::before {
  content: "AI";
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 32px;
  margin-right: 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
}

.brand small {
  display: block;
  margin-left: 62px;
  color: var(--blue);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--yellow);
  outline: 2px solid var(--ink);
}

.ad-billboard {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 14px 22px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
  text-align: center;
}

main { overflow: hidden; }

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 34px;
  align-items: center;
  padding: 64px clamp(18px, 5vw, 72px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,250,240,.96), rgba(255,250,240,.72) 54%, rgba(255,250,240,.96)),
    var(--hero-image) center/cover no-repeat;
  z-index: -1;
}

.eyebrow,
.ad-label {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: .98;
  letter-spacing: 0;
}

.highlight {
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
}

.hero p {
  max-width: 620px;
  color: #3f4b5f;
  font-size: 20px;
}

.hero-title-break { display: inline; }

.hero-actions,
.section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary { background: #fff; }
.button.mint { background: var(--mint); }
.button.pink { background: var(--pink); color: #fff; }
.button.small { min-height: 38px; padding: 8px 13px; font-size: 13px; }

.shop-card {
  padding: 24px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.shop-card h2 {
  margin-bottom: 10px;
  font-size: 30px;
}

.shop-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.shop-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #f8fbff;
  font-weight: 800;
}

section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px clamp(18px, 4vw, 40px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.section-head h2 {
  display: inline;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
}

.section-head p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
}

.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tabs button {
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.filter-tabs button[aria-selected="true"] {
  background: var(--yellow);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.article-card,
.budget-card,
.policy-card {
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: 5px 5px 0 #bfeaff;
}

.product-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.product-card:nth-child(2n) { box-shadow: 5px 5px 0 #ffd0df; }
.product-card:nth-child(3n) { box-shadow: 5px 5px 0 #bff7df; }

.rank {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}

.product-card h3 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
}

.product-card p,
.article-card p,
.policy-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.rank-reasons {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border: 3px solid var(--ink);
  background: #fff8cf;
  list-style: none;
}

.rank-reasons li {
  position: relative;
  padding-left: 18px;
  color: #1c1f24;
  font-size: 13px;
  line-height: 1.55;
}

.rank-reasons li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #5166b8;
  font-size: 10px;
}

.ranking-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  background: #f6f1d6;
  color: #1c1f24;
  font-size: 13px;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 0;
  border: 4px solid #1c1f24;
  background: #1c1f24;
  box-shadow: 8px 8px 0 #6f755b;
}

.ranking-row {
  display: grid;
  grid-template-columns: 86px 150px minmax(0, 1fr) 150px;
  gap: 0;
  min-height: 176px;
  border-bottom: 2px solid #c7ccb2;
  background: #f8f4dd;
}

.ranking-row:nth-child(even) {
  background: #ece8d4;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-position {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background: #25282d;
  color: #fffaf0;
}

.ranking-position strong {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
}

.ranking-position span {
  min-width: 52px;
  padding: 4px 6px;
  border-top: 1px solid rgba(255, 255, 255, .26);
  color: #f2d36b;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.ranking-cover {
  display: grid;
  place-items: end start;
  min-height: 140px;
  margin: 18px;
  padding: 12px;
  border: 2px solid #1c1f24;
  color: #fffaf0;
  font-weight: 900;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #5166b8, #1c1f24);
}

.ranking-cover span {
  padding: 5px 8px;
  background: rgba(28, 31, 36, .72);
}

.cover-book { background: linear-gradient(135deg, #5166b8, #9ab2d6 52%, #1c1f24); }
.cover-manga { background: linear-gradient(135deg, #d84b8a, #f2d36b 54%, #1c1f24); }
.cover-quiz { background: linear-gradient(135deg, #8bac0f, #dbe7bf 54%, #1c1f24); }
.cover-course { background: linear-gradient(135deg, #5166b8, #d84b8a 54%, #1c1f24); }
.cover-prompt { background: linear-gradient(135deg, #1c1f24, #8e9775 58%, #f2d36b); }

.ranking-main {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px 22px;
}

.ranking-main h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.2;
}

.ranking-main p {
  margin: 0;
  color: #3f4b5f;
  font-weight: 800;
}

.ranking-main .rank-reasons {
  padding: 0;
  border: 0;
  background: transparent;
}

.ranking-score {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  background: #d4d4cf;
  text-align: center;
}

.ranking-score span {
  color: #3f4b5f;
  font-size: 12px;
  font-weight: 900;
}

.ranking-score strong {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 3px solid #1c1f24;
  background: #f2d36b;
  font-size: 30px;
  line-height: 1;
}

.meta-row,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-row span,
.tag-row span {
  padding: 4px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fffaf0;
  font-size: 12px;
  font-weight: 900;
}

.compare-wrap {
  overflow-x: auto;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--yellow);
  font-weight: 900;
}

tr:last-child td { border-bottom: 0; }

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.budget-card,
.policy-card {
  padding: 24px;
}

.budget-form {
  display: grid;
  gap: 14px;
}

.budget-form label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}

.budget-result {
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--yellow);
  font-size: 28px;
  font-weight: 900;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.newsletter {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: center;
  padding: 30px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
}

.newsletter p { color: #cbd5e1; }
.newsletter .button { width: 100%; }
.form-message { min-height: 24px; margin: 10px 0 0; color: var(--mint); font-weight: 900; }

.site-footer {
  margin-top: 40px;
  padding: 34px clamp(18px, 5vw, 72px);
  border-top: 3px solid var(--ink);
  background: #fff;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  font-weight: 900;
}
.disclosure { font-weight: 900; color: var(--blue); }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px clamp(18px, 5vw, 40px);
}

.page-card {
  padding: 28px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .site-header,
  .section-head,
  .newsletter {
    display: grid;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-grid,
  .article-grid,
  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header { position: static; }
  .nav { gap: 6px; font-size: 12px; }
  h1 { font-size: 44px; }
  .hero { padding-top: 38px; }
  .shop-card { padding: 18px; }
  section { padding-block: 42px; }
  .button { width: 100%; }
  .newsletter { padding: 22px; }
}

/* Retro console skin for site 4: Game Boy / Super Famicom inspired. */
body[data-site="ai-products"] {
  --ink: #1c1f24;
  --muted: #59616f;
  --line: #1c1f24;
  --paper: #d7dec2;
  --panel: #f6f1d6;
  --yellow: #f7d34b;
  --blue: #5166b8;
  --mint: #8bac0f;
  --pink: #d84b8a;
  --shadow: 7px 7px 0 #1c1f24;
  background:
    linear-gradient(rgba(28, 31, 36, .05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(28, 31, 36, .05) 2px, transparent 2px),
    radial-gradient(circle at 20% 0%, rgba(247, 211, 75, .28), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(81, 102, 184, .22), transparent 26%),
    #d7dec2;
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
  font-family: "MS Gothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", monospace;
  letter-spacing: 0;
}

body[data-site="ai-products"] .site-header {
  max-width: 1180px;
  margin: 18px auto 0;
  position: sticky;
  border: 5px solid var(--ink);
  border-radius: 0;
  background: #ece6c6;
  box-shadow: 8px 8px 0 #6f755b;
}

body[data-site="ai-products"] .brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  text-transform: uppercase;
}

body[data-site="ai-products"] .brand::before {
  content: "AI";
  width: 58px;
  height: 36px;
  margin-right: 0;
  border-radius: 0;
  background: #f7d34b;
  box-shadow: 4px 4px 0 var(--ink);
}

body[data-site="ai-products"] .brand small {
  width: 100%;
  margin-left: 72px;
  color: #5166b8;
}

body[data-site="ai-products"] .nav a {
  border: 3px solid transparent;
  border-radius: 0;
}

body[data-site="ai-products"] .nav a:hover,
body[data-site="ai-products"] .nav a:focus-visible {
  border-color: var(--ink);
  background: #f7d34b;
  box-shadow: 3px 3px 0 var(--ink);
}

body[data-site="ai-products"] .ad-billboard {
  border-width: 5px;
  border-radius: 0;
  background: #f6f1d6;
  box-shadow: 8px 8px 0 #1c1f24;
}

body[data-site="ai-products"] .hero {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  max-width: 1180px;
  min-height: 360px;
  margin: 24px auto 0;
  padding: 34px clamp(18px, 4vw, 44px);
  border: 10px solid #23262c;
  border-radius: 30px;
  background: #8b9572;
  box-shadow: inset 0 0 0 8px #515a42, 12px 12px 0 #1c1f24;
  overflow: hidden;
}

body[data-site="ai-products"] .hero::before {
  inset: 18px;
  border: 5px solid #1c1f24;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(206, 219, 146, .94), rgba(206, 219, 146, .82)),
    var(--hero-image) center/cover no-repeat;
  image-rendering: pixelated;
}

body[data-site="ai-products"] .hero::after {
  content: "";
  position: absolute;
  right: 46px;
  bottom: 30px;
  padding: 5px 12px;
  border: 3px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  font-size: 12px;
  font-weight: 900;
}

body[data-site="ai-products"] h1 {
  max-width: 820px;
  font-size: clamp(38px, 4.2vw, 52px);
  line-height: 1.14;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, .75);
}

body[data-site="ai-products"] .hero .eyebrow,
body[data-site="ai-products"] .article-body > .eyebrow,
body[data-site="ai-products"] .article-hub-panel > .eyebrow {
  display: flex;
  margin: 0 0 18px;
}

body[data-site="ai-products"] .hero-lead {
  max-width: 680px;
  margin: 12px 0 0;
  color: #1c1f24;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.75;
}

body[data-site="ai-products"] .highlight,
body[data-site="ai-products"] .section-head h2 {
  background: linear-gradient(transparent 62%, #f7d34b 62%);
}

body[data-site="ai-products"] .eyebrow,
body[data-site="ai-products"] .ad-label {
  border-radius: 0;
  background: #8bac0f;
  color: #111827;
  box-shadow: 3px 3px 0 #1c1f24;
}

body[data-site="ai-products"] .button {
  position: relative;
  border-width: 4px;
  border-radius: 0;
  background: #f7d34b;
  box-shadow: 5px 5px 0 #1c1f24;
  transition: transform .12s ease, box-shadow .12s ease;
}

body[data-site="ai-products"] .button::before {
  content: "▶";
  margin-right: 8px;
  font-size: 12px;
}

body[data-site="ai-products"] .button:hover,
body[data-site="ai-products"] .button:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #1c1f24;
}

body[data-site="ai-products"] .button.secondary {
  background: #f6f1d6;
}

body[data-site="ai-products"] .button.mint {
  background: #8bac0f;
}

body[data-site="ai-products"] .button.pink {
  background: #d84b8a;
}

body[data-site="ai-products"] .game-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 10px auto 0;
  padding: 14px 18px;
  border: 5px solid #1c1f24;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(246, 241, 214, .98), rgba(255, 249, 217, .96)),
    repeating-linear-gradient(0deg, rgba(28, 31, 36, .06) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(28, 31, 36, .06) 0 1px, transparent 1px 18px);
  box-shadow: 8px 8px 0 #6f755b;
}

body[data-site="ai-products"] .game-brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  color: #1c1f24;
}

body[data-site="ai-products"] .game-brand::before {
  content: none;
}

body[data-site="ai-products"] .brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 44px;
  border: 4px solid #1c1f24;
  background: #f7d34b;
  box-shadow: 4px 4px 0 #1c1f24;
  font-size: 18px;
  font-weight: 950;
}

body[data-site="ai-products"] .brand-copy {
  min-width: 0;
  font-size: clamp(16px, 1.6vw, 20px);
}

body[data-site="ai-products"] .game-nav {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  justify-content: end;
  gap: 8px;
  min-width: 0;
}

body[data-site="ai-products"] .game-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 9px 12px;
  border: 3px solid #1c1f24;
  border-radius: 0;
  background: #fff9d9;
  box-shadow: 3px 3px 0 #1c1f24;
  color: #1c1f24;
  text-align: center;
  text-decoration: none;
  line-height: 1.15;
  font-weight: 950;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

body[data-site="ai-products"] .game-nav a:hover,
body[data-site="ai-products"] .game-nav a:focus-visible {
  background: #f7d34b;
  outline: 0;
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #1c1f24;
}

body[data-site="ai-products"] .header-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 10px 12px;
  border: 3px solid #1c1f24;
  background: #20242a;
  color: #fff9d9;
  text-align: center;
  box-shadow: 4px 4px 0 #8bac0f;
}

body[data-site="ai-products"] .header-status strong {
  font-size: 16px;
}

body[data-site="ai-products"] .mobile-menu-button {
  display: none;
  width: 48px;
  height: 44px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  box-shadow: 3px 3px 0 #1c1f24;
  cursor: pointer;
}

body[data-site="ai-products"] .mobile-menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  background: #1c1f24;
}

@media (max-width: 980px) {
  body[data-site="ai-products"] .game-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  body[data-site="ai-products"] .mobile-menu-button {
    display: block;
  }

  body[data-site="ai-products"] .game-nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 12px;
  }

  body[data-site="ai-products"] .game-header[data-menu-open="true"] .game-nav {
    display: grid;
  }

  body[data-site="ai-products"] .game-nav a {
    width: 100%;
    min-height: 44px;
  }

  body[data-site="ai-products"] .header-status {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: left;
  }

  body[data-site="ai-products"] .game-header[data-menu-open="true"] .header-status {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  body[data-site="ai-products"] .game-header {
    width: min(100% - 18px, 1180px);
    margin-top: 8px;
    padding: 12px;
    border-width: 4px;
    box-shadow: 5px 5px 0 #6f755b;
  }

  body[data-site="ai-products"] .game-brand {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  body[data-site="ai-products"] .brand-mark {
    width: 52px;
    height: 38px;
    border-width: 3px;
    box-shadow: 3px 3px 0 #1c1f24;
  }

  body[data-site="ai-products"] .brand-copy {
    font-size: 15px;
  }

  body[data-site="ai-products"] .brand-copy small {
    font-size: 9px;
  }

  body[data-site="ai-products"] .game-nav a {
    min-height: 54px;
    font-size: 13px;
  }
}

body[data-site="ai-products"] .shop-card {
  border-width: 6px;
  border-radius: 0;
  background: #f6f1d6;
  box-shadow: 9px 9px 0 #1c1f24;
  padding: 18px;
}

body[data-site="ai-products"] .shop-card h2::before {
  content: "";
  display: block;
  color: #5166b8;
  font-size: 13px;
}

body[data-site="ai-products"] .shop-list li {
  border-width: 3px;
  border-radius: 0;
  background: #e9e0b8;
}

body[data-site="ai-products"] section {
  position: relative;
  scroll-margin-top: 120px;
}

body[data-site="ai-products"] .admin-panel {
  scroll-margin-top: 120px;
}

body[data-site="ai-products"] .section-head {
  padding: 14px 0;
  border-bottom: 5px solid #1c1f24;
}

body[data-site="ai-products"] .section-head h2 {
  font-size: clamp(34px, 5vw, 64px);
}

body[data-site="ai-products"] .filter-tabs button {
  border-width: 3px;
  border-radius: 0;
  background: #f6f1d6;
  box-shadow: 3px 3px 0 #1c1f24;
}

body[data-site="ai-products"] .filter-tabs button[aria-selected="true"] {
  background: #8bac0f;
}

body[data-site="ai-products"] .product-card,
body[data-site="ai-products"] .article-card,
body[data-site="ai-products"] .budget-card,
body[data-site="ai-products"] .policy-card,
body[data-site="ai-products"] .page-card {
  border-width: 5px;
  border-radius: 0;
  background: #f6f1d6;
  box-shadow: 8px 8px 0 #1c1f24;
}

body[data-site="ai-products"] .product-card {
  position: relative;
  padding-top: 28px;
  background:
    linear-gradient(90deg, #5166b8 0 18px, transparent 18px),
    linear-gradient(#f6f1d6, #efe5b9);
}

body[data-site="ai-products"] .product-card:nth-child(2n) {
  background:
    linear-gradient(90deg, #d84b8a 0 18px, transparent 18px),
    linear-gradient(#f6f1d6, #efe5b9);
  box-shadow: 8px 8px 0 #1c1f24;
}

body[data-site="ai-products"] .product-card:nth-child(3n) {
  background:
    linear-gradient(90deg, #8bac0f 0 18px, transparent 18px),
    linear-gradient(#f6f1d6, #efe5b9);
  box-shadow: 8px 8px 0 #1c1f24;
}

body[data-site="ai-products"] .product-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 10px;
  color: rgba(28, 31, 36, .48);
  font-size: 11px;
  font-weight: 900;
}

body[data-site="ai-products"] .rank {
  border-width: 4px;
  border-radius: 0;
  background: #f7d34b;
  box-shadow: 4px 4px 0 #1c1f24;
}

body[data-site="ai-products"] .meta-row span,
body[data-site="ai-products"] .tag-row span,
body[data-site="ai-products"] .tag-row a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border: 3px solid #1c1f24;
  border-radius: 0;
  background: #e2d9aa;
  color: #1c1f24;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

body[data-site="ai-products"] .compare-wrap {
  border-width: 6px;
  border-radius: 0;
  background: #f6f1d6;
}

body[data-site="ai-products"] th {
  background: #5166b8;
  color: #fff;
}

body[data-site="ai-products"] th,
body[data-site="ai-products"] td {
  border-color: #1c1f24;
  border-width: 3px;
}

body[data-site="ai-products"] input,
body[data-site="ai-products"] select {
  border-width: 4px;
  border-radius: 0;
  background: #e9e0b8;
  font-weight: 900;
}

body[data-site="ai-products"] .budget-result {
  border-width: 5px;
  border-radius: 0;
  background: #8bac0f;
  color: #1c1f24;
  box-shadow: 5px 5px 0 #1c1f24;
}

body[data-site="ai-products"] .newsletter {
  border-width: 6px;
  border-radius: 0;
  background: #23262c;
  box-shadow: 10px 10px 0 #6f755b;
}

body[data-site="ai-products"] .site-footer {
  max-width: 1180px;
  margin: 52px auto 0;
  border: 5px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 8px 8px 0 #6f755b;
}

@media (max-width: 980px) {
  body[data-site="ai-products"] .site-header {
    margin: 0;
    border-width: 0 0 5px;
    box-shadow: none;
  }

  body[data-site="ai-products"] .hero {
    grid-template-columns: 1fr;
    border-radius: 0;
    border-inline: 0;
    box-shadow: inset 0 0 0 6px #515a42;
  }
}

@media (max-width: 640px) {
  body[data-site="ai-products"] .brand small {
    margin-left: 0;
  }

  body[data-site="ai-products"] h1 {
    font-size: 34px;
    line-height: 1.12;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, .82);
  }

  body[data-site="ai-products"] .hero-title-break { display: inline; }

  body[data-site="ai-products"] .hero {
    margin-top: 16px;
    padding: 30px 18px 44px;
    overflow: clip;
  }

  body[data-site="ai-products"] .hero::before {
    inset: 10px;
  }

  body[data-site="ai-products"] .hero::after {
    right: 22px;
    bottom: 20px;
  }

  body[data-site="ai-products"] .hero p {
    font-size: 17px;
    line-height: 1.8;
  }

  body[data-site="ai-products"] .hero-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-site="ai-products"] .hero-roadmap {
    display: none;
  }

  body[data-site="ai-products"] .quick-start {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  body[data-site="ai-products"] .quick-start a {
    min-height: auto;
    padding: 10px;
    border-width: 3px;
    box-shadow: 3px 3px 0 #1c1f24;
  }

  body[data-site="ai-products"] .quick-start strong {
    font-size: 13px;
  }

  body[data-site="ai-products"] .quick-start span {
    font-size: 11px;
    line-height: 1.5;
  }

  body[data-site="ai-products"] .section-head h2 {
    font-size: 36px;
  }

  body[data-site="ai-products"] .product-card,
  body[data-site="ai-products"] .article-card,
  body[data-site="ai-products"] .budget-card,
  body[data-site="ai-products"] .policy-card {
    box-shadow: 5px 5px 0 #1c1f24;
  }

  body[data-site="ai-products"] .newsletter {
    width: 100%;
    grid-template-columns: 1fr;
    overflow: hidden;
    box-shadow: 5px 5px 0 #6f755b;
  }

  body[data-site="ai-products"] .compare-wrap {
    max-width: 100%;
  }
}
/* Persona / decision clarity block */
.decision-panel {
  max-width: 1180px;
  margin: 46px auto 0;
  padding: 28px clamp(18px, 4vw, 36px);
  border: 6px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 8px 8px 0 #1c1f24;
}

.section-head.compact { margin-bottom: 18px; }
.section-head.compact h2 { font-size: clamp(30px, 5vw, 52px); }

.decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.decision-grid article {
  padding: 18px;
  border: 4px solid #1c1f24;
  background: #e9e0b8;
  box-shadow: 4px 4px 0 #6f755b;
}

.decision-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #5166b8;
  font-size: 14px;
}

.decision-grid strong::before {
  content: "▶ ";
  color: #1c1f24;
}

.decision-grid p {
  margin: 0;
  color: #1c1f24;
  font-size: 14px;
}

.quest-section,
.quiz-section {
  position: relative;
}

.quest-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.quest-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 5px solid #1c1f24;
  background: #e9e0b8;
  box-shadow: 6px 6px 0 #6f755b;
}

.quest-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -9px;
  height: 10px;
  border: 3px solid #1c1f24;
  background: repeating-linear-gradient(90deg, #8bac0f 0 18px, #f7d34b 18px 36px);
}

.quest-card.danger {
  background: #ffe3ec;
  box-shadow: 6px 6px 0 #5166b8;
}

.stage {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-size: 12px;
  font-weight: 900;
}

.quest-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.quest-card p {
  margin: 0;
  color: #1c1f24;
  font-size: 14px;
}

.quest-card meter {
  width: 100%;
  height: 18px;
}

.mini-link {
  align-self: end;
  color: #1c1f24;
  font-weight: 900;
}

.quiz-arena,
.evidence-panel {
  border: 6px solid #1c1f24;
  background: #23262c;
  color: #fff;
  box-shadow: 10px 10px 0 #6f755b;
}

.quiz-arena {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
}

.quiz-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #f7d34b;
  font-weight: 900;
}

.quiz-arena h3 {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.25;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quiz-options button {
  min-height: 62px;
  padding: 14px;
  border: 4px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  box-shadow: 4px 4px 0 #8bac0f;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.quiz-options button[data-result="correct"],
.quiz-options button[data-answer="true"] {
  background: #8bac0f;
}

.quiz-options button[data-result="wrong"] {
  background: #ff6b9a;
  color: #fff;
}

.quiz-feedback {
  min-height: 54px;
  margin: 0;
  padding: 14px;
  border: 3px solid #f7d34b;
  background: #1c1f24;
  color: #fff;
  font-weight: 800;
}

.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.evidence-panel {
  margin-top: 18px;
  padding: 20px;
  background: #f6f1d6;
  color: #1c1f24;
}

.evidence-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.evidence-panel p {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .decision-grid { grid-template-columns: 1fr 1fr; }
  .quest-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .decision-grid { grid-template-columns: 1fr; }
  .quest-map,
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-status { align-items: flex-start; flex-direction: column; }
}

/* Responsive safety guards */
[hidden] {
  display: none !important;
}

img, video, canvas, svg { max-width: 100%; height: auto; }
a, button, input, select, textarea, th, td, h1, h2, h3, p, li { overflow-wrap: anywhere; }
table { max-width: 100%; }
.button, .nav a, .tag, .level-tab { white-space: normal; text-align: center; }
.table-wrap, .compare-wrap { max-width: 100%; overflow-x: auto; }

/* Site 4 learning-game upgrade */
.quick-start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
  margin-top: 16px;
}

.quick-start a {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 96px;
  padding: 12px;
  border: 4px solid #1c1f24;
  background: rgba(246, 241, 214, .78);
  box-shadow: 4px 4px 0 #1c1f24;
  color: #1c1f24;
  text-decoration: none;
}

.quick-start strong {
  font-size: 17px;
}

.quick-start span {
  color: #59616f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.hero-roadmap {
  align-content: start;
}

.hero-roadmap h2 {
  font-size: 24px;
  line-height: 1.35;
}

.hero-roadmap > p {
  margin: 0 0 14px;
  color: #1c1f24;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
}

.hero-mini-links {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.hero-mini-links a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 9px;
  border: 3px solid #1c1f24;
  background: #e9e0b8;
  color: #1c1f24;
  text-decoration: none;
  box-shadow: 3px 3px 0 #1c1f24;
}

.hero-mini-links strong {
  font-size: 13px;
}

.hero-mini-links span {
  color: #59616f;
  font-size: 12px;
  font-weight: 900;
}

.hero-proof-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.hero-proof-list div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 3px 8px;
  align-items: center;
  padding: 9px;
  border: 3px solid #1c1f24;
  background: #e9e0b8;
  box-shadow: 3px 3px 0 #1c1f24;
}

.hero-proof-list span {
  display: inline-grid;
  width: fit-content;
  grid-row: 1 / span 2;
  padding: 3px 7px;
  border: 2px solid #1c1f24;
  background: #f7d34b;
  font-size: 11px;
  font-weight: 900;
}

.hero-proof-list strong {
  font-size: 19px;
  line-height: 1.2;
}

.hero-proof-list small {
  color: #59616f;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.study-dashboard {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 32px);
  border: 6px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 10px 10px 0 #6f755b;
}

body[data-auth="guest"] [data-login-feature],
body[data-auth="signed-in"] [data-login-gate] {
  display: none !important;
}

.login-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
  gap: 16px;
  align-items: stretch;
  margin: 16px 0;
}

.login-gate {
  align-items: center;
  padding: 20px;
  border: 5px solid #1c1f24;
  background: #23262c;
  color: #fff;
  box-shadow: 6px 6px 0 #1c1f24;
}

.login-gate h3 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

.login-gate p {
  margin: 0;
  color: #e4e8d0;
}

.study-login {
  margin: 16px 0;
  background: #fff9d9;
}

.study-record {
  margin-top: 24px;
  border-top: 5px solid #1c1f24;
}

.study-record > section {
  padding: 26px 0;
  border-bottom: 5px solid #1c1f24;
}

.study-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.study-record-heading > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.study-record-heading > div:first-child > span {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-weight: 900;
}

.study-record-heading h3,
.study-record-heading p {
  margin: 0;
}

.study-record-heading h3 {
  font-size: 28px;
  line-height: 1.1;
}

.study-record-heading p {
  margin-top: 5px;
  color: #4f5546;
  font-weight: 700;
}

.study-record-heading > a {
  color: #1c1f24;
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.exam-plan-form,
.daily-record-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr .7fr auto;
  gap: 12px;
  align-items: end;
}

.exam-plan-form label,
.daily-record-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.exam-plan-form select,
.exam-plan-form input,
.daily-record-form input,
.daily-record-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
  color: #1c1f24;
  font: inherit;
  font-weight: 800;
}

.daily-record-form textarea {
  resize: vertical;
  line-height: 1.65;
}

.number-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 3px solid #1c1f24;
  background: #fff9d9;
}

.number-with-unit input {
  border: 0;
}

.number-with-unit em {
  padding: 0 12px 0 4px;
  font-style: normal;
}

.study-save-message {
  min-height: 24px;
  margin: 10px 0 0;
  color: #5166b8;
  font-size: 13px;
  font-weight: 900;
}

.exam-countdown,
.today-results,
.weekly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 3px solid #1c1f24;
  border-bottom: 3px solid #1c1f24;
}

.exam-countdown > div,
.today-results > div,
.weekly-summary > div {
  padding: 15px 18px;
  border-right: 3px solid #1c1f24;
}

.exam-countdown > div:last-child,
.today-results > div:last-child,
.weekly-summary > div:last-child {
  border-right: 0;
}

.exam-countdown span,
.today-results span,
.weekly-summary span {
  display: block;
  color: #4f5546;
  font-size: 12px;
  font-weight: 900;
}

.exam-countdown strong,
.today-results strong,
.weekly-summary strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.2;
}

.daily-record-form {
  grid-template-columns: minmax(240px, 1fr) auto;
  margin-top: 18px;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 38px minmax(110px, auto) 38px;
  align-items: center;
  gap: 6px;
}

.calendar-nav button {
  width: 38px;
  height: 38px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
  color: #1c1f24;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.calendar-nav strong {
  text-align: center;
  white-space: nowrap;
  font-size: 18px;
}

.study-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekday {
  padding: 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.calendar-day {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 7px;
  border: 2px solid #1c1f24;
  background: rgba(255, 249, 217, .5);
  color: #1c1f24;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.calendar-day:hover,
.calendar-day:focus-visible {
  transform: translateY(-2px);
  outline: 3px solid #5166b8;
  outline-offset: 1px;
}

.calendar-day strong,
.calendar-day small {
  display: block;
}

.calendar-day small {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 900;
}

.calendar-day strong { font-size: 14px; }

.calendar-day[data-level="1"] { background: #e6efb0; }
.calendar-day[data-level="2"] { background: #bad36a; }
.calendar-day[data-level="3"] { background: #8bac0f; }
.calendar-day[data-today="true"] { outline: 4px solid #5166b8; outline-offset: -4px; }
.calendar-day.is-empty { border-color: transparent; background: transparent; }

@media (max-width: 760px) {
  .study-record > section {
    padding: 22px 0;
  }

  .study-record-heading {
    display: grid;
    gap: 12px;
  }

  .study-record-heading h3 { font-size: 22px; }

  .study-record-heading p { font-size: 13px; }

  .study-record-heading > a {
    margin-left: 46px;
  }

  .exam-plan-form,
  .daily-record-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-plan-form .button,
  .daily-record-form .button,
  .study-note-field {
    grid-column: 1 / -1;
  }

  .exam-countdown,
  .today-results,
  .weekly-summary {
    grid-template-columns: 1fr;
  }

  .exam-countdown > div,
  .today-results > div,
  .weekly-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 4px;
    border-right: 0;
    border-bottom: 2px solid #1c1f24;
  }

  .exam-countdown > div:last-child,
  .today-results > div:last-child,
  .weekly-summary > div:last-child {
    border-bottom: 0;
  }

  .exam-countdown strong,
  .today-results strong,
  .weekly-summary strong {
    margin: 0;
    font-size: 20px;
  }

  .calendar-day {
    min-height: 48px;
    padding: 4px;
  }

  .calendar-day small {
    font-size: 9px;
  }
}

.subsection-heading,
.study-share-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.subsection-heading {
  padding-bottom: 10px;
  border-bottom: 3px solid #1c1f24;
}

.subsection-heading h4,
.subsection-heading span,
.study-share-heading h3,
.study-share-heading p {
  margin: 0;
}

.subsection-heading h4 { font-size: 18px; }
.subsection-heading span { color: #5166b8; font-size: 12px; font-weight: 900; }

.major-progress {
  margin-top: 24px;
}

.major-progress-list {
  display: grid;
}

.major-progress-row {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(180px, 1.4fr);
  align-items: center;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 2px solid rgba(28, 31, 36, .26);
}

.major-progress-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.major-progress-row strong { font-size: 15px; }
.major-progress-row > div span { color: #5166b8; font-size: 13px; font-weight: 900; white-space: nowrap; }

.major-progress-track {
  display: block;
  height: 10px;
  background: rgba(28, 31, 36, .14);
}

.major-progress-track i {
  display: block;
  height: 100%;
  background: #8bac0f;
}

.empty-study-copy {
  margin: 14px 0 0;
  color: #62675c;
  font-size: 14px;
}

.focus-summary {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: start;
}

.focus-primary {
  padding: 18px 0;
  border-top: 3px solid #1c1f24;
  border-bottom: 3px solid #1c1f24;
}

.focus-primary span,
.focus-primary strong,
.focus-primary em {
  display: block;
}

.focus-primary span { color: #4f5546; font-size: 12px; font-weight: 900; }
.focus-primary strong { margin-top: 8px; font-size: 22px; line-height: 1.35; }
.focus-primary em { margin-top: 8px; color: #5166b8; font-size: 16px; font-style: normal; font-weight: 900; }

.weekly-summary strong[data-week-focus] {
  font-size: 18px;
  line-height: 1.35;
}

.study-day-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 4px solid #1c1f24;
  background: #fff9d9;
  color: #1c1f24;
  box-shadow: 10px 10px 0 #1c1f24;
}

.study-day-dialog::backdrop { background: rgba(20, 32, 43, .76); }

.study-day-dialog-box {
  position: relative;
  padding: 34px;
}

.study-day-header {
  padding-right: 52px;
  border-bottom: 4px solid #1c1f24;
}

.study-day-header span {
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.study-day-header h2 {
  margin: 7px 0 6px;
  font-size: 32px;
}

.study-day-header p {
  margin: 0 0 18px;
  color: #4f5546;
}

.study-day-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 3px solid #1c1f24;
}

.study-day-stats > div { padding: 16px 18px; border-right: 2px solid #1c1f24; }
.study-day-stats > div:last-child { border-right: 0; }
.study-day-stats span { display: block; color: #4f5546; font-size: 12px; font-weight: 900; }
.study-day-stats strong { display: block; margin-top: 4px; font-size: 26px; }

.study-day-section,
.study-share {
  padding: 26px 0 0;
}

.study-day-section h3 { margin: 0 0 12px; font-size: 19px; }
.study-day-section textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border: 3px solid #1c1f24;
  background: #f8f2d5;
  color: #1c1f24;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}
.study-day-section .button { margin-top: 10px; }

.study-problem-list { border-top: 3px solid #1c1f24; }
.study-problem-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 50px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 2px solid rgba(28, 31, 36, .25);
}
.study-problem-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #f7d34b;
  border: 2px solid #1c1f24;
  font-size: 12px;
  font-weight: 900;
}
.study-problem-row small { color: #5166b8; font-weight: 900; }
.study-problem-row p { margin: 5px 0 0; line-height: 1.55; }
.study-problem-row > strong { color: #8bac0f; font-size: 12px; }
.study-problem-row[data-correct="false"] > strong { color: #ba3d4f; }

.study-share {
  margin-top: 28px;
  border-top: 5px solid #1c1f24;
}

.study-share-heading span { color: #5166b8; font-size: 12px; font-weight: 900; }
.study-share-heading h3 { margin-top: 5px; font-size: 22px; }
.study-share-heading p { max-width: 350px; color: #62675c; font-size: 12px; }

.share-template-tabs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.share-template-tabs button {
  min-height: 42px;
  padding: 8px 14px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
  color: #1c1f24;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.share-template-tabs button[aria-selected="true"] { background: #f7d34b; }

.share-options {
  display: flex;
  gap: 20px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 800;
}

.share-options label { display: flex; align-items: center; gap: 7px; }
.share-options input { width: 18px; height: 18px; accent-color: #8bac0f; }

.share-preview-frame {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 10px;
  background: #1c1f24;
}

.share-preview-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.share-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 760px) {
  .major-progress-row { grid-template-columns: 1fr; gap: 8px; }
  .focus-summary { grid-template-columns: 1fr; gap: 14px; }
  .study-day-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: none;
  }
  .study-day-dialog-box { padding: 24px 18px 32px; }
  .study-day-header h2 { font-size: 25px; }
  .study-day-header p { font-size: 13px; }
  .study-day-stats > div { padding: 12px 8px; }
  .study-day-stats strong { font-size: 20px; }
  .study-problem-row { grid-template-columns: 28px minmax(0, 1fr); }
  .study-problem-row > strong { grid-column: 2; }
  .study-share-heading { display: block; }
  .study-share-heading p { margin-top: 8px; }
  .share-template-tabs { display: grid; grid-template-columns: 1fr; }
  .share-options { display: grid; gap: 9px; }
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

.study-login.simple {
  display: block;
  max-width: 720px;
  margin: 16px auto;
  padding: clamp(18px, 4vw, 28px);
}

.study-login.simple .login-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.study-login.simple .form-intro {
  display: grid;
  gap: 8px;
  margin-bottom: 4px;
}

.study-login.simple .form-intro h3 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
}

.study-login.simple .form-intro p {
  margin: 0;
  color: #1c1f24;
  font-weight: 800;
  line-height: 1.7;
}

.study-login.compact {
  max-width: none;
}

.account-actions {
  display: grid;
  gap: 10px;
}

.account-modal {
  width: min(680px, calc(100% - 28px));
  max-height: min(92vh, 820px);
  border: 0;
  border-radius: 22px;
  background: #fffdf2;
  color: #1c1f24;
  box-shadow: 0 30px 80px rgba(14, 18, 25, .35);
  padding: 0;
}

.account-modal::backdrop {
  background: rgba(12, 16, 22, .62);
  backdrop-filter: blur(3px);
}

.account-modal-box {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #cfd6dd;
  border-radius: 50%;
  background: #fff;
  color: #1c1f24;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #f3f5f7;
}

.account-modal h2 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.18;
}

.account-modal .form-intro {
  display: grid;
  gap: 8px;
  padding-right: 54px;
}

.modal-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e7f4b8;
  color: #314000;
  font-size: 12px;
  font-weight: 950;
}

.account-modal .form-intro p {
  max-width: 520px;
  margin: 0;
  color: #4a5360;
  font-weight: 700;
  line-height: 1.75;
}

.account-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-benefits li {
  padding: 10px 12px;
  border: 1px solid #dfe5c7;
  border-radius: 12px;
  background: #fbfee9;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.modal-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.modal-section-title {
  margin-top: 2px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 950;
}

.modal-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.account-modal .modal-field input,
.account-modal .modal-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: #111827;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.account-modal .modal-field input:focus,
.account-modal .modal-field select:focus {
  border-color: #7aa10b;
  outline: 3px solid rgba(132, 169, 20, .2);
}

.modal-form .profile-reason {
  grid-column: 1;
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  background: #f7f9ff;
  color: #43526b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.account-submit {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  font-size: 16px;
}

@media (max-width: 720px) {
  .account-modal {
    width: min(100% - 18px, 680px);
  }

  .account-modal-box {
    gap: 16px;
    padding: 20px;
  }

  .account-modal .form-intro {
    padding-right: 44px;
  }

  .account-benefits,
  .modal-field-grid {
    grid-template-columns: 1fr;
  }

  .account-benefits li {
    padding: 9px 10px;
  }
}

.pass-meter,
.next-study {
  padding: 20px;
  border: 5px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 5px 5px 0 #1c1f24;
}

.pass-meter strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(42px, 8vw, 84px);
  line-height: .9;
}

.pass-meter p,
.next-study p {
  margin: 0;
  font-weight: 800;
}

.meter-line,
.syllabus-tile i {
  display: block;
  height: 16px;
  border: 3px solid #1c1f24;
  background: #ece6c6;
  overflow: hidden;
}

.meter-line i,
.syllabus-tile i::before {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: #8bac0f;
}

.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.log-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.log-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 5px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 5px 5px 0 #1c1f24;
}

.log-card.main {
  background: #8bac0f;
}

.log-label {
  width: fit-content;
  padding: 4px 8px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-size: 12px;
  font-weight: 900;
}

.log-card strong {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
}

.log-card p {
  margin: 0;
  color: #1c1f24;
  font-weight: 800;
}

.syllabus-progress {
  margin-top: 18px;
  padding: 18px;
  border: 5px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 5px 5px 0 #1c1f24;
}

.syllabus-progress .section-head {
  margin-bottom: 12px;
}

.syllabus-progress h3 {
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
}

.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.priority-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.priority-lane {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  border: 4px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 4px 4px 0 #1c1f24;
}

.priority-lane > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-weight: 900;
}

.priority-lane strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.priority-lane small {
  display: block;
  margin-top: 4px;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.priority-lane em {
  font-style: normal;
  font-size: 20px;
  font-weight: 900;
}

.priority-lane[data-state="要復習"] > span {
  background: #ffb3c7;
}

.priority-lane[data-state="安定"] > span {
  background: #8bac0f;
}

.chapter-progress {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 4px solid #1c1f24;
  background: #ece6c6;
}

.chapter-line {
  display: grid;
  grid-template-columns: minmax(180px, .6fr) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.chapter-line span {
  font-size: 13px;
  font-weight: 900;
}

.chapter-line i,
.syllabus-line i {
  display: block;
  height: 12px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
  overflow: hidden;
}

.chapter-line i::before,
.syllabus-line i::before {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: #8bac0f;
}

.chapter-line strong {
  font-size: 14px;
}

.syllabus-details {
  margin-top: 14px;
}

.syllabus-details summary {
  width: fit-content;
  padding: 8px 12px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  box-shadow: 3px 3px 0 #1c1f24;
  font-weight: 900;
  cursor: pointer;
}

.syllabus-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.syllabus-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 86px minmax(90px, .28fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
}

.syllabus-line span {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  border: 2px solid #1c1f24;
  background: #f7d34b;
  font-size: 11px;
  font-weight: 900;
}

.syllabus-line[data-state="安定"] span {
  background: #8bac0f;
}

.syllabus-line[data-state="要復習"] span {
  background: #ffb3c7;
}

.syllabus-line strong {
  min-width: 0;
  font-size: 14px;
}

.syllabus-line small {
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.syllabus-tile {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
}

.syllabus-tile span {
  width: fit-content;
  padding: 2px 6px;
  border: 2px solid #1c1f24;
  background: #f7d34b;
  font-size: 11px;
  font-weight: 900;
}

.syllabus-tile[data-state="安定"] span {
  background: #8bac0f;
}

.syllabus-tile[data-state="要復習"] span {
  background: #ffb3c7;
}

.syllabus-tile strong {
  font-size: 15px;
  line-height: 1.35;
}

.syllabus-tile small {
  color: #5166b8;
  font-weight: 900;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 80px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr);
  gap: 24px;
  align-items: stretch;
  padding: clamp(24px, 5vw, 48px) 0 24px;
}

.admin-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .95;
}

.admin-hero p {
  max-width: 720px;
  font-size: 18px;
  font-weight: 800;
}

.admin-login,
.admin-locked,
.admin-panel,
.admin-status,
.admin-kpis article {
  border: 5px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 5px 5px 0 #1c1f24;
}

.admin-login {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.admin-login label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.admin-login input {
  width: 100%;
  min-height: 48px;
  border: 4px solid #1c1f24;
  background: #f6f1d6;
  padding: 10px 12px;
  font: inherit;
}

.admin-login p {
  margin: 0;
  color: #5166b8;
  font-size: 13px;
}

body[data-admin-auth="open"] .admin-hero {
  grid-template-columns: 1fr;
  padding-bottom: 12px;
}

.admin-locked {
  padding: 28px;
  text-align: center;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.admin-status span,
.admin-badge {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 8px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-size: 12px;
  font-weight: 900;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-kpis article {
  padding: 16px;
}

.admin-kpis span,
.admin-kpis small,
.admin-table small {
  display: block;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.admin-kpis strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
}

.admin-panel {
  padding: 18px;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-panel h2,
.admin-panel h3 {
  margin: 0 0 8px;
}

.admin-panel p {
  margin: 0;
  color: #59616f;
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 4px solid #1c1f24;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #f6f1d6;
}

.admin-table th {
  background: #23262c;
  color: #fff;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 3px solid #1c1f24;
  text-align: left;
  vertical-align: middle;
}

.admin-table button {
  min-height: 32px;
  margin: 2px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-weight: 900;
  cursor: pointer;
}

.admin-table tr[data-status="suspended"] {
  opacity: .62;
}

.admin-two-column,
.admin-security-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-security-notes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-two-column article,
.admin-security-notes article {
  padding: 14px;
  border: 4px solid #1c1f24;
  background: #f6f1d6;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 3px solid #1c1f24;
  background: #fff9d9;
}

.admin-list-row span,
.admin-list-row small {
  display: block;
}

.admin-list-row small {
  margin-top: 4px;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.admin-list-row strong {
  font-size: 22px;
}

.admin-operations {
  margin: 18px 0;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.ops-owner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.ops-summary article,
.ops-owner-summary article {
  padding: 12px;
  border: 3px solid #1c1f24;
  background: #f6f1d6;
}

.ops-summary span,
.ops-owner-summary span {
  display: block;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.ops-summary strong,
.ops-owner-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 4px solid #1c1f24;
  background: #fffef1;
  box-shadow: 4px 4px 0 #6f755b;
}

.ops-card[data-ops-complete="true"] {
  background: #f3ffd4;
}

.ops-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 3px solid #1c1f24;
}

.ops-card-head h3 {
  margin: 0;
}

.ops-card-head span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border: 2px solid #1c1f24;
  background: #f7d34b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ops-card label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  padding: 10px;
  border: 2px solid rgba(28, 31, 36, .24);
  background: rgba(255, 255, 255, .45);
  font-weight: 900;
  line-height: 1.5;
}

.ops-card input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #86b300;
}

.ops-card small {
  grid-column: 2;
  display: block;
  color: #59616f;
  font-size: 12px;
  font-weight: 800;
}

.ops-owner {
  grid-column: 2;
  width: fit-content;
  padding: 2px 8px;
  border: 2px solid #1c1f24;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.ops-owner-codex {
  background: #dff7c2;
}

.ops-owner-assisted {
  background: #fff0a8;
}

.ops-owner-user {
  background: #ffe0e0;
}

.quest-path {
  position: relative;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  padding: 26px;
  border: 6px solid #1c1f24;
  background: linear-gradient(135deg, rgba(246,241,214,.88), rgba(217,226,185,.92));
  box-shadow: inset 0 0 0 6px rgba(111,117,91,.35), 8px 8px 0 #1c1f24;
}

.quest-path::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 10px;
  border: 3px solid #1c1f24;
  background: repeating-linear-gradient(90deg, #f7d34b 0 24px, #8bac0f 24px 48px);
  transform: translateY(-50%);
  z-index: 0;
}

.quest-path .quest-card {
  z-index: 1;
  min-height: 280px;
  align-content: start;
}

.quest-card[data-cleared="true"] {
  outline: 5px solid #8bac0f;
}

.stage-progress {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.stage-progress span {
  font-size: 13px;
  font-weight: 900;
}

.stage-progress i,
.quiz-life i {
  display: block;
  height: 16px;
  border: 3px solid #1c1f24;
  background:
    linear-gradient(90deg, #8bac0f var(--progress), #f6f1d6 var(--progress));
  box-shadow: 2px 2px 0 #1c1f24;
}

.stage-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.stage-actions .mini-link {
  padding: 7px 6px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  box-shadow: 2px 2px 0 #1c1f24;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
}

.quiz-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .55fr);
  gap: 22px;
  align-items: stretch;
}

.quiz-shell-single {
  grid-template-columns: minmax(0, 1fr);
}

.quiz-controls {
  display: grid;
  grid-template-columns: minmax(150px, .32fr) minmax(320px, .9fr) minmax(92px, .2fr) minmax(170px, .42fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border: 5px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 6px 6px 0 #6f755b;
}

.weak-control button,
.level-picker select,
.field-picker select,
.login-form input {
  min-height: 46px;
  border: 3px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  font: inherit;
  font-weight: 900;
  box-shadow: 2px 2px 0 #1c1f24;
}

.weak-control button {
  padding: 8px 10px;
  cursor: pointer;
}

.weak-control button {
  display: grid;
  gap: 1px;
  align-content: center;
  width: 100%;
  text-align: left;
}

.weak-control button[aria-disabled="true"] {
  opacity: .58;
}

.weak-control button[data-enabled="true"] {
  background: #f7d34b;
  opacity: 1;
}

.weak-control small {
  color: #4b5563;
  font-size: 11px;
}

.quiz-control-group {
  display: grid;
  gap: 4px;
  color: #1c1f24;
  font-size: 12px;
  font-weight: 900;
}

.field-picker select,
.level-picker select {
  width: 100%;
  padding: 0 10px;
}

.quiz-control-meta {
  display: grid;
  gap: 0;
  justify-items: center;
  font-weight: 900;
}

.quiz-control-meta span {
  color: #4b5563;
  font-size: 11px;
}

.quiz-control-meta strong {
  font-size: 20px;
}

.quiz-stage-line {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  gap: 14px;
  align-items: center;
}

.quiz-stage-line span {
  padding: 7px 10px;
  border: 3px solid #f7d34b;
  color: #f7d34b;
  font-weight: 900;
}

.quiz-life {
  min-width: 0;
}

.quiz-options {
  gap: 14px;
}

.quiz-options button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  text-align: left;
  font-size: 18px;
}

.quiz-options button span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  box-shadow: 2px 2px 0 #1c1f24;
}

.quiz-feedback[data-state="correct"] {
  border-color: #8bac0f;
  background: #24331d;
}

.quiz-feedback[data-state="wrong"] {
  border-color: #ff6b9a;
  background: #3b2030;
}

.recommend-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border: 6px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  box-shadow: 8px 8px 0 #6f755b;
}

body[data-site="ai-products"] .decision-panel {
  display: none;
}

body[data-site="ai-products"] .hero + .quiz-section {
  margin-top: 30px;
}

body[data-site="ai-products"] .quiz-section .section-head h2 {
  font-size: clamp(40px, 6vw, 72px);
}

body[data-site="ai-products"] .quiz-section .section-head p {
  color: #1c1f24;
  font-weight: 900;
}

body[data-site="ai-products"] .evidence-panel {
  box-shadow: 5px 5px 0 #6f755b;
}

body[data-site="ai-products"] .evidence-panel strong {
  font-size: 16px;
}

body[data-site="ai-products"] .evidence-panel p {
  font-size: 14px;
  line-height: 1.7;
}

body[data-site="ai-products"] #ranking .section-head h2 {
  font-size: clamp(32px, 5vw, 58px);
}

body[data-site="ai-products"] #ranking .section-head h2::before {
  content: "";
  display: block;
  color: #5166b8;
  font-size: 16px;
  line-height: 1.2;
}

.recommend-card h3 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
}

.recommend-card p {
  margin: 0;
  color: #1c1f24;
  font-weight: 800;
}

.vocab-section {
  margin-top: 18px;
}

body[data-site="ai-products"] #vocab .section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  padding: 0;
  border-bottom: 0;
  margin-bottom: 16px;
}

body[data-site="ai-products"] #vocab .section-head h2 {
  display: inline;
  max-width: none;
  background: linear-gradient(transparent 52%, #f7d34b 52%);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
}

body[data-site="ai-products"] #vocab .section-head p {
  max-width: 720px;
  margin-top: 14px;
  color: #1c1f24;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.6;
}

body[data-site="ai-products"] #vocab .filter-tabs {
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

body[data-site="ai-products"] #vocab .filter-tabs button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #b9bf94;
  background: rgba(255, 250, 240, .72);
  box-shadow: none;
  font-size: 12px;
  color: #1c1f24;
}

body[data-site="ai-products"] #vocab .vocab-categories span {
  color: #59616f;
  font-size: 12px;
  font-weight: 900;
}

body[data-site="ai-products"] #vocab .filter-tabs button[aria-selected="true"] {
  border-color: #1c1f24;
  background: #e7edc5;
}

.vocab-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.vocab-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 14px;
}

body[data-site="ai-products"] #vocab .vocab-tools {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.vocab-tools label {
  display: grid;
  font-weight: 900;
}

.vocab-tools label span {
  display: none;
}

.vocab-tools input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 4px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  font: inherit;
  font-weight: 900;
  box-shadow: 4px 4px 0 #1c1f24;
}

body[data-site="ai-products"] #vocab .vocab-tools input {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #8e9775;
  background: rgba(255, 250, 240, .78);
  box-shadow: none;
  font-size: 13px;
}

.vocab-tools strong {
  padding: 12px;
  border: 4px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 4px 4px 0 #1c1f24;
  white-space: nowrap;
}

body[data-site="ai-products"] #vocab .vocab-tools strong {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #3f4b5f;
  font-size: 13px;
}

.vocab-clear {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #8e9775;
  background: rgba(255, 250, 240, .54);
  color: #3f4b5f;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.vocab-clear:hover,
.vocab-clear:focus-visible {
  background: #e7edc5;
  color: #1c1f24;
}

.vocab-importance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}

.vocab-importance {
  margin-top: 0;
}

.vocab-importance span {
  color: #3f4b5f;
  font-size: 12px;
  font-weight: 900;
}

.vocab-importance button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #b9bf94;
  background: rgba(255, 250, 240, .72);
  color: #1c1f24;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
  cursor: pointer;
}

body[data-site="ai-products"] #vocab .vocab-importance {
  gap: 7px;
  margin-bottom: 12px;
}

body[data-site="ai-products"] #vocab .vocab-importance button {
  min-height: 40px;
  padding: 8px 12px;
  border-width: 1px;
  background: rgba(255, 250, 240, .72);
  box-shadow: none;
  font-size: 12px;
}

.vocab-importance button[aria-selected="true"] {
  border-color: #1c1f24;
  background: #e7edc5;
  transform: none;
  box-shadow: none;
}

.vocab-summary article {
  padding: 16px;
  border: 5px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 5px 5px 0 #6f755b;
}

body[data-site="ai-products"] #vocab .vocab-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

body[data-site="ai-products"] #vocab .vocab-summary article {
  padding: 10px 12px;
  border: 1px solid #b9bf94;
  background: rgba(255, 250, 240, .7);
  box-shadow: none;
}

.vocab-summary span {
  display: block;
  color: #5166b8;
  font-size: 13px;
  font-weight: 900;
}

.vocab-summary strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
}

body[data-site="ai-products"] #vocab .vocab-summary strong {
  font-size: clamp(20px, 2.4vw, 28px);
}

.vocab-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.vocab-start {
  padding: 18px;
  border: 1px dashed #b9bf94;
  background: rgba(255, 250, 240, .72);
  text-align: center;
}

.vocab-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(140px, .45fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 0;
  padding: 12px;
  border: 1px solid #b9bf94;
  background: rgba(255, 250, 240, .78);
  box-shadow: none;
}

.vocab-card[data-status="known"] {
  background:
    linear-gradient(90deg, #8bac0f 0 5px, transparent 5px),
    rgba(255, 250, 240, .78);
}

.vocab-card[data-status="review"] {
  background:
    linear-gradient(90deg, #d84b8a 0 5px, transparent 5px),
    rgba(255, 250, 240, .78);
}

.vocab-main {
  min-width: 0;
}

.vocab-card h3 {
  margin: 0;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.1;
}

.vocab-card p {
  margin: 0;
  color: #1c1f24;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.55;
}

.vocab-card small {
  color: #59616f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.vocab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vocab-meta span {
  padding: 4px 6px;
  border: 1px solid #b9bf94;
  background: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 900;
}

.vocab-meta .difficulty-stars {
  background: #fff6d7;
}

.vocab-meta .importance-high {
  background: #e85d5d;
  color: #fffaf0;
}

.vocab-meta .importance-mid {
  background: #f2d36b;
  color: #1c1f24;
}

.vocab-meta .importance-low {
  background: #dbe7bf;
  color: #1c1f24;
}

.vocab-detail {
  grid-column: 1 / -1;
  border-top: 1px solid #d1d6b4;
  padding-top: 10px;
}

.vocab-detail summary {
  width: fit-content;
  cursor: pointer;
  color: #2f477a;
  font-size: 13px;
  font-weight: 900;
}

.vocab-detail div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .48);
}

.vocab-detail p {
  margin: 0;
  color: #1c1f24;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.vocab-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  min-width: 178px;
}

.vocab-actions .button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.mypage-panel {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 32px);
  border: 6px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 8px 8px 0 #6f755b;
}

.login-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 5px solid #1c1f24;
  background: #ece6c6;
  box-shadow: 5px 5px 0 #1c1f24;
}

.login-console h3,
.login-console p {
  margin: 0;
}

.login-console h3 {
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 38px);
}

.login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.study-login .login-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.study-login .login-form button,
.study-login .login-form .profile-reason {
  grid-column: span 2;
}

.study-login.simple .login-form {
  grid-template-columns: 1fr;
}

.study-login.simple .login-form button,
.study-login.simple .login-form .profile-reason,
.study-login.simple .form-intro {
  grid-column: 1;
}

.login-form input,
.login-form select {
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 3px solid #1c1f24;
  background: #f6f1d6;
  color: #1c1f24;
  font: inherit;
  font-weight: 900;
  box-shadow: 2px 2px 0 #1c1f24;
}

.profile-reason {
  margin: 0;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.6;
}

.mypage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.mypage-stats article {
  padding: 16px;
  border: 4px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 4px 4px 0 #1c1f24;
}

.mypage-stats span,
.field-row small,
.recent-row small {
  display: block;
  color: #5166b8;
  font-size: 12px;
  font-weight: 900;
}

.mypage-stats strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.1;
}

.mypage-detail {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}

.mypage-detail article {
  padding: 18px;
  border: 4px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 4px 4px 0 #1c1f24;
}

.mypage-detail h3 {
  margin: 0 0 12px;
}

.field-breakdown,
.recent-answers {
  display: grid;
  gap: 8px;
}

.field-row,
.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 3px solid #1c1f24;
}

.field-row span,
.recent-row strong {
  min-width: 0;
  font-weight: 900;
}

.recent-row span {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 28px;
  border: 3px solid #1c1f24;
  background: #f7d34b;
  font-size: 12px;
  font-weight: 900;
}

.recent-row[data-result="wrong"] span {
  background: #ffb3c7;
}

.empty-state {
  margin: 0;
  color: #59616f;
  font-weight: 800;
}

@media (max-width: 980px) {
  .quick-start,
  .log-grid,
  .quiz-shell,
  .quiz-controls,
  .vocab-summary,
  .login-console,
  .mypage-stats,
  .mypage-detail,
  .login-gate,
  .admin-hero,
  .admin-kpis,
  .admin-two-column,
  .admin-security-notes,
  .ops-summary,
  .ops-owner-summary,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel-head,
  .admin-status {
    display: grid;
    grid-template-columns: 1fr;
  }

  .syllabus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .priority-lanes,
  .chapter-line {
    grid-template-columns: 1fr;
  }

  .syllabus-line {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .syllabus-line i {
    grid-column: 1 / -1;
  }

  .vocab-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ranking-cover {
    min-height: 118px;
    margin: 14px;
  }

  .ranking-main,
  .ranking-score {
    grid-column: 2;
  }

  .ranking-score {
    justify-items: start;
    grid-template-columns: auto auto;
    background: #ece8d4;
    border-top: 1px solid #c7ccb2;
  }

  .vocab-tools {
    grid-template-columns: 1fr;
  }

  body[data-site="ai-products"] #vocab .vocab-tools,
  body[data-site="ai-products"] #vocab .vocab-summary {
    grid-template-columns: 1fr;
  }

  .quest-path {
    grid-template-columns: 1fr 1fr;
  }

  .quest-path::before {
    display: none;
  }
}

@media (max-width: 640px) {
  body[data-site="ai-products"] .hero + .quiz-section {
    margin-top: 18px;
  }

  body[data-site="ai-products"] .quiz-section {
    padding-top: 14px;
  }

  body[data-site="ai-products"] .quiz-section .section-head {
    margin-bottom: 10px;
  }

  body[data-site="ai-products"] .quiz-section .section-head h2 {
    font-size: 32px;
  }

  body[data-site="ai-products"] .quiz-section .section-head p {
    display: none;
  }

  body[data-site="ai-products"] .quiz-controls {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border-width: 4px;
    box-shadow: 4px 4px 0 #6f755b;
  }

  body[data-site="ai-products"] .quiz-control-group {
    gap: 3px;
    font-size: 11px;
  }

  body[data-site="ai-products"] .field-picker {
    grid-column: auto;
  }

  body[data-site="ai-products"] .level-picker select,
  body[data-site="ai-products"] .field-picker select {
    min-height: 40px;
    border-width: 3px;
    font-size: 13px;
    box-shadow: 2px 2px 0 #1c1f24;
  }

  body[data-site="ai-products"] .quiz-control-meta strong {
    font-size: 18px;
  }

  body[data-site="ai-products"] .quiz-control-meta {
    display: none;
  }

  body[data-site="ai-products"] .quiz-arena {
    gap: 8px;
    padding: 10px;
    border-width: 4px;
    box-shadow: 5px 5px 0 #6f755b;
  }

  body[data-site="ai-products"] .quiz-status {
    gap: 6px;
    font-size: 13px;
  }

  body[data-site="ai-products"] .quiz-stage-line {
    display: none;
  }

  body[data-site="ai-products"] .quiz-stage-line span {
    padding: 5px 7px;
    border-width: 2px;
    font-size: 11px;
    line-height: 1.35;
  }

  body[data-site="ai-products"] .quiz-life {
    height: 8px;
  }

  body[data-site="ai-products"] .quiz-arena h3 {
    font-size: 16px;
    line-height: 1.32;
  }

  body[data-site="ai-products"] .quiz-options {
    gap: 8px;
  }

  body[data-site="ai-products"] .quiz-options button {
    grid-template-columns: 30px 1fr;
    gap: 8px;
    min-height: 46px;
    padding: 8px;
    border-width: 3px;
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 3px 3px 0 #8bac0f;
  }

  body[data-site="ai-products"] .quiz-options button span {
    width: 30px;
    height: 30px;
    border-width: 2px;
    box-shadow: 1px 1px 0 #1c1f24;
  }

  body[data-site="ai-products"] .quiz-feedback {
    min-height: 0;
    padding: 9px;
    border-width: 2px;
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-site="ai-products"] .quiz-feedback[data-state="idle"] {
    display: none;
  }

  body[data-site="ai-products"] .quiz-actions .button {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .ranking-list {
    box-shadow: 5px 5px 0 #6f755b;
  }

  .ranking-row {
    grid-template-columns: 58px 86px minmax(0, 1fr);
    min-height: 0;
  }

  .ranking-position {
    grid-row: 1 / 3;
  }

  .ranking-position strong {
    font-size: 34px;
  }

  .ranking-position span {
    min-width: 0;
    font-size: 10px;
  }

  .ranking-cover {
    grid-column: 2;
    min-height: 86px;
    margin: 10px;
    padding: 8px;
    font-size: 11px;
  }

  .ranking-main {
    grid-column: 3;
    padding: 10px 10px 8px;
    gap: 6px;
  }

  .ranking-main h3 {
    font-size: 18px;
  }

  .ranking-main p {
    font-size: 12px;
    line-height: 1.45;
  }

  .ranking-main .rank-reasons {
    display: none;
  }

  .ranking-score {
    grid-column: 2 / -1;
    grid-template-columns: auto auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    padding: 8px 10px 10px;
  }

  .ranking-score strong {
    width: 42px;
    height: 34px;
    font-size: 18px;
  }

  .ranking-score .button {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .quick-start {
    margin-top: 16px;
  }

  .study-dashboard {
    margin-inline: 0;
    border-inline: 0;
    box-shadow: none;
  }

  .log-card {
    min-height: 120px;
  }

  .quest-path {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .stage-actions {
    grid-template-columns: 1fr;
  }

  .quiz-stage-line {
    grid-template-columns: 1fr;
  }

  .quiz-options button {
    min-height: 74px;
    font-size: 16px;
  }

  .vocab-actions {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .vocab-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .vocab-grid {
    grid-template-columns: 1fr;
  }

  .syllabus-grid {
    grid-template-columns: 1fr;
  }

  .priority-lane {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .priority-lane em {
    grid-column: 2;
  }

  .pass-meter strong {
    font-size: 48px;
  }

  .login-form,
  .field-row,
  .recent-row {
    grid-template-columns: 1fr;
  }

  .quiz-control-meta {
    justify-items: start;
  }
}

/* Plain account form: keep the site playful, keep registration ordinary. */
body[data-site="ai-products"] .account-modal {
  border: 0;
  border-radius: 22px;
  background: #fffdf2;
}

body[data-site="ai-products"] .account-modal * {
  box-shadow: none;
}

body[data-site="ai-products"] .account-modal-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

body[data-site="ai-products"] .account-modal .modal-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

body[data-site="ai-products"] .account-modal .modal-section-title,
body[data-site="ai-products"] .account-modal .modal-field-grid,
body[data-site="ai-products"] .account-modal .profile-reason,
body[data-site="ai-products"] .account-modal .terms-check,
body[data-site="ai-products"] .account-modal .signin-note,
body[data-site="ai-products"] .account-modal .account-submit {
  grid-column: 1;
}

body[data-site="ai-products"] .account-modal .modal-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-site="ai-products"] .account-modal .signin-form .modal-field-grid {
  grid-template-columns: 1fr;
}

body[data-site="ai-products"] .account-modal .modal-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-site="ai-products"] .account-modal .modal-field span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: keep-all;
}

body[data-site="ai-products"] .account-modal .required-badge {
  color: #dc2626;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

body[data-site="ai-products"] .account-modal input,
body[data-site="ai-products"] .account-modal select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

body[data-site="ai-products"] .account-modal input::placeholder {
  color: #8a94a6;
}

body[data-site="ai-products"] .account-modal input:focus,
body[data-site="ai-products"] .account-modal select:focus {
  border-color: #7aa10b;
  outline: 3px solid rgba(132, 169, 20, .2);
}

body[data-site="ai-products"] .account-modal .account-benefits li {
  border: 1px solid #dfe5c7;
  border-radius: 12px;
  background: #fbfee9;
}

body[data-site="ai-products"] .account-modal .profile-reason {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  background: #f7f9ff;
  color: #43526b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

body[data-site="ai-products"] .account-modal .terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

body[data-site="ai-products"] .account-modal .terms-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 3px;
  padding: 0;
  border-radius: 4px;
  accent-color: #1f2937;
}

body[data-site="ai-products"] .account-modal .terms-check a {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-site="ai-products"] .account-modal .modal-status {
  min-height: 1.6em;
  margin: 0;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
}

body[data-site="ai-products"] .confirmation-help {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(25, 35, 45, .22);
  background: rgba(255, 255, 255, .55);
}

body[data-site="ai-products"] .confirmation-help[hidden] { display: none; }
body[data-site="ai-products"] .confirmation-help p { margin: 8px 0 12px; }
body[data-site="ai-products"] .confirmation-help .button { margin: 4px 6px 0 0; }

body[data-site="ai-products"] .account-modal .signin-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

body[data-site="ai-products"] .account-modal .account-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #1f2937;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

body[data-site="ai-products"] .account-modal .account-submit::before {
  content: none;
}

body[data-site="ai-products"] .account-modal .modal-close {
  border: 1px solid #cfd6dd;
  border-radius: 50%;
  background: #fff;
}

body[data-site="ai-products"] .account-modal .modal-close::before {
  content: none;
}

/* Bring the modal slightly closer to the home screen without making the form noisy. */
body[data-site="ai-products"] .account-modal {
  border: 3px solid var(--ink);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  background:
    linear-gradient(rgba(255, 253, 242, .96), rgba(255, 253, 242, .96)),
    repeating-linear-gradient(0deg, rgba(28, 31, 36, .045) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(28, 31, 36, .045) 0 1px, transparent 1px 22px);
  box-shadow: 8px 8px 0 rgba(28, 31, 36, .34);
}

body[data-site="ai-products"] .account-modal .modal-kicker {
  border: 2px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
}

body[data-site="ai-products"] .account-modal h2 {
  display: inline;
  width: fit-content;
  background: linear-gradient(transparent 62%, var(--yellow) 62%);
}

body[data-site="ai-products"] .account-modal .modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-site="ai-products"] .account-modal .modal-section-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  background: var(--yellow);
}

body[data-site="ai-products"] .account-modal .account-submit {
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

body[data-site="ai-products"] .account-modal .account-submit:hover,
body[data-site="ai-products"] .account-modal .account-submit:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

body[data-site="ai-products"] .account-modal .modal-close {
  border: 2px solid var(--ink);
  color: var(--ink);
}

@media (max-width: 720px) {
  body[data-site="ai-products"] .account-modal {
    width: min(100% - 20px, 680px);
    max-height: calc(100dvh - 20px);
  }

  body[data-site="ai-products"] .account-modal-box {
    gap: 12px;
    padding: 18px;
  }

  body[data-site="ai-products"] .account-modal h2 {
    font-size: clamp(28px, 9vw, 34px);
  }

  body[data-site="ai-products"] .account-modal input,
  body[data-site="ai-products"] .account-modal select {
    min-height: 42px;
  }

  body[data-site="ai-products"] .account-modal .modal-field-grid,
  body[data-site="ai-products"] .account-modal .account-benefits {
    grid-template-columns: 1fr;
  }
}

.legal-section {
  width: min(920px, calc(100% - 36px));
  margin: 32px auto 72px;
  padding: clamp(22px, 4vw, 38px);
  border: 4px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 6px 6px 0 #6f755b;
}

.legal-section h2 {
  margin: 28px 0 10px;
  font-size: clamp(22px, 3vw, 30px);
}

.legal-section h2:first-child {
  margin-top: 0;
}

.legal-section p {
  margin: 0;
  color: #354052;
  font-weight: 800;
  line-height: 1.9;
}

.article-hub {
  width: min(1120px, calc(100% - 36px));
  margin: 32px auto 72px;
}

.article-hub-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.article-hub-panel,
.article-route,
.article-body,
.article-summary-box {
  border: 4px solid #1c1f24;
  background: #fff9d9;
  box-shadow: 6px 6px 0 #6f755b;
}

.article-hub-panel {
  padding: clamp(22px, 4vw, 36px);
}

.article-hub-panel h1,
.article-body h1 {
  display: inline;
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.18;
  background: linear-gradient(transparent 68%, #f7d34b 68%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, .72);
}

.article-hub-panel h1 + *,
.article-body h1 + * {
  margin-top: 28px;
}

.article-hub-panel p,
.article-body p,
.article-summary-box p {
  color: #354052;
  font-weight: 800;
  line-height: 1.9;
}

.article-route {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.article-route a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 3px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 3px 3px 0 #1c1f24;
  text-decoration: none;
  font-weight: 900;
}

.article-route strong {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #f7d34b;
  border: 2px solid #1c1f24;
}

.article-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-feature-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 4px solid #1c1f24;
  background: #f6f1d6;
  box-shadow: 6px 6px 0 #1c1f24;
}

.article-feature-card h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}

.article-feature-card p {
  margin: 0;
  color: #354052;
  font-weight: 800;
  line-height: 1.8;
}

.article-body {
  width: min(920px, calc(100% - 36px));
  margin: 32px auto 72px;
  padding: clamp(22px, 4vw, 42px);
}

.article-body h2 {
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 4px solid #1c1f24;
  font-size: clamp(24px, 3.2vw, 34px);
}

.article-body h3 {
  margin: 22px 0 8px;
  font-size: clamp(20px, 2.6vw, 26px);
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 1.3em;
  color: #354052;
  font-weight: 800;
  line-height: 1.8;
}

.article-summary-box {
  margin: 22px 0;
  padding: 18px;
  background: #f6f1d6;
}

.article-summary-box h2,
.article-summary-box h3 {
  margin-top: 0;
}

.article-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.article-check-grid div {
  padding: 14px;
  border: 3px solid #1c1f24;
  background: #fffef1;
}

.article-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .article-hub-lead,
  .article-feature-grid,
  .article-check-grid {
    grid-template-columns: 1fr;
  }
}
