/*
 * Academy-inspired front-page theme, approved direction 2026-10-20.
 * Chinese headings use locally available Songti-style serif faces.
 * This is not Anthropic's font or an exact cross-platform typeface match.
 */
:root {
  --ac-display: Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --ac-welcome: #f1eee7;
  --ac-peach: #ead0bf;
  --ac-sage: #ccd9cf;
  --ac-lilac: #d9d4e3;
  --ac-paper: #fffdf8;
  --ac-paper-back: #f3eee4;
  --ac-art-ink: #64594e;
  --ac-shadow: 0 1px 2px rgba(55, 46, 33, .05);
}
html[data-theme="dark"] {
  --ac-welcome: #29251f;
  --ac-peach: #594336;
  --ac-sage: #394b40;
  --ac-lilac: #494353;
  --ac-paper: #dcd4c7;
  --ac-paper-back: #bbae9d;
  --ac-art-ink: #524a40;
  --ac-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
html[lang="zh-CN"] main :is(h1, h2, .h1, .h2),
html[lang="zh-CN"] #pg-home :is(.hm-cell .cell-t, .hm-h),
html[lang="zh-CN"] #pg-tools :is(.tl-title, .tc-n),
html[lang="zh-CN"] #pg-tool .tp-h1,
html[lang="zh-CN"] #pg-login :is(.lg-stage-title, .lg-say-h, .lg-h),
html[lang="zh-CN"] #pg-me .hm-cell-single .cell-t {
  font-family: var(--ac-display);
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
}
#pg-home.ac-home { padding-bottom: 0; }
#pg-home.ac-home .ac-wrap,
#pg-home.ac-home > .band > .wrap {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1120px;
  margin-inline: auto;
}
#pg-home.ac-home > .band > .wrap { padding-inline: 0; }
#pg-home.ac-home .ac-welcome {
  background: var(--ac-welcome);
  padding: 54px 0 48px;
  border-bottom: 1px solid var(--line-2);
}
.ac-eyebrow { color: var(--ink-2); font-size: 13px; line-height: 1.5; font-weight: 400; letter-spacing: .05em; }
#pg-home.ac-home .ac-title {
  font-family: var(--ac-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.35;
  letter-spacing: -.015em;
  margin: 16px 0;
  text-wrap: balance;
}
.ac-community-name { white-space: nowrap; }
.ac-community-name sup { color: var(--accent); font-size: .42em; top: -.85em; position: relative; vertical-align: baseline; margin-left: 1px; }
#pg-home.ac-home .ac-intro { font-size: 17px; line-height: 1.85; color: var(--ink-2); max-width: 790px; }
.ac-welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
#pg-home.ac-home .ac-welcome-actions :is(.btn,.btn-2) { border-radius: 10px; min-height: 46px; padding: 11px 18px; font-size: 15px; gap: 12px; }
.ac-start { padding: 44px 0 32px; }
.ac-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
#pg-home.ac-home .ac-section-head h2 { font-family: var(--ac-display); font-size: 28px; line-height: 1.45; font-weight: 400; letter-spacing: 0; }
.ac-section-head > p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.ac-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ac-entry {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--cell); box-shadow: var(--ac-shadow);
  text-decoration: none; color: var(--ink);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ac-entry:hover { transform: translateY(-3px); border-color: var(--line-firm); box-shadow: 0 8px 22px -14px rgba(68,47,29,.35); }
.ac-entry:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ac-cover { height: 140px; overflow: hidden; flex-shrink: 0; }
.ac-tools .ac-cover { background: var(--ac-peach); }
.ac-questions .ac-cover { background: var(--ac-sage); }
.ac-me .ac-cover { background: var(--ac-lilac); }
.ac-cover > svg { width: 100%; height: 100%; display: block; }
.ac-art-orbit { stroke: var(--ac-art-ink); stroke-width: 1; opacity: .1; }
.ac-paper { fill: var(--ac-paper); stroke: var(--ac-art-ink); stroke-opacity: .18; stroke-width: 1; }
.ac-paper-back { fill: var(--ac-paper-back); stroke: var(--ac-art-ink); stroke-opacity: .14; stroke-width: 1; }
.ac-art-ink { stroke: var(--ac-art-ink); }
.ac-entry-copy { padding: 21px 24px 22px; display: flex; flex-direction: column; flex: 1; }
#pg-home.ac-home .ac-entry h3 { font-family: var(--ac-display); font-size: 24px; font-weight: 400; line-height: 1.4; margin: 0 0 9px; text-wrap: balance; letter-spacing: 0; }
.ac-entry-copy > p { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.ac-entry-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--accent); font-size: 13px; line-height: 1.5; margin-top: auto; padding-top: 20px; }
.ac-entry-action > svg { flex-shrink: 0; }

/* The private band remains intact, including invitation forms and question state. */
#pg-home.ac-home > #hm-mine-band { padding: 0 0 12px; background: transparent; }
#pg-home.ac-home #hm-mine-band > .wrap { max-width: 1120px; padding: 20px 24px; border-radius: 12px; background: var(--cell); }
#pg-home.ac-home .hm-mine { grid-template-columns: 220px minmax(0,1fr); gap: 24px; }
#pg-home.ac-home .hm-mine-h .h2 { font-family: var(--ac-display); font-size: 21px; font-weight: 400; }
#pg-home.ac-home .hm-mine-h > .lead { font-size: 12px; }
#pg-home.ac-home .hm-mi-empty { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#pg-home.ac-home .hm-mi-empty .lead { font-size: 14px; }
#pg-home.ac-home .hm-mi-empty .lnk-a { font-size: 13px; margin: 0; }

#pg-home.ac-home > #hm-new { padding: 32px 0 40px; background: transparent; scroll-margin-top: 95px; }
#pg-home.ac-home #hm-new .sec-h { margin-bottom: 22px; gap: 20px; }
#pg-home.ac-home #hm-new .sec-h .h2 { font-family: var(--ac-display); font-size: 28px; font-weight: 400; line-height: 1.4; }
#pg-home.ac-home #hm-new .sec-h .lead { font-size: 14px; line-height: 1.6; margin-top: 6px; }
#pg-home.ac-home #hm-new .sec-h > .lnk-a { font-size: 14px; }
#pg-home.ac-home .hm-cell.hm-cell-single { border-radius: 16px; padding: 0; gap: 0; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); overflow: hidden; background: var(--cell); border: 1px solid var(--line); box-shadow: var(--ac-shadow); }
#pg-home.ac-home .hm-cell-single .hm-card-copy { padding: 30px 32px; align-self: center; }
#pg-home.ac-home .hm-cell-single .cell-k { color: var(--accent); font-size: 12px; }
#pg-home.ac-home .hm-cell-single .cell-t { font-family: var(--ac-display); font-weight: 400; font-size: 28px; line-height: 1.5; margin-top: 10px; }
#pg-home.ac-home .hm-cell-single .cell-p { font-size: 15px; line-height: 1.75; max-width: 34em; margin-top: 10px; }
#pg-home.ac-home .hm-cell-single .hm-img { padding: 24px 32px; border-radius: 0; background: var(--ac-welcome); max-height: 248px; display: flex; align-items: center; }
#pg-home.ac-home .hm-cell-single .device { max-height: 200px; overflow: hidden; box-shadow: var(--shadow-thumb); }
#pg-home.ac-home .hm-cell:not(.hm-cell-single) .cell-t { font-family: var(--ac-display); font-weight: 400; }
.ac-feedback { padding: 0 0 40px; }
#pg-home.ac-home .hm-talk { gap: 20px; }
#pg-home.ac-home :is(.hm-voices,.hm-asked) { padding: 24px; border: 1px solid var(--line); box-shadow: var(--ac-shadow); }
#pg-home.ac-home .hm-k { font-family: var(--ac-display); font-size: 21px; line-height: 1.4; font-weight: 400; color: var(--ink); }
#pg-home.ac-home .hm-vl { margin-top: 12px; }
#pg-home.ac-home .hm-vl .body { font-size: 14px; line-height: 1.75; }
#pg-home.ac-home .hm-asked > .lead { font-size: 14px; line-height: 1.75; margin-top: 12px; }
.ac-ask { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 32px; margin-bottom: 56px; background: var(--ac-welcome); border: 1px solid var(--line-2); border-radius: 16px; }
#pg-home.ac-home .ac-ask h2 { font-family: var(--ac-display); font-size: 28px; font-weight: 400; line-height: 1.45; margin: 10px 0; }
.ac-ask > div > p:last-child { color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.ac-ask > .btn-2 { flex-shrink: 0; border-radius: 10px; gap: 12px; }
.ac-latest { padding-block: 32px; }
.ac-empty { color: var(--ink-2); font-size: 16px; line-height: 1.75; margin-bottom: 16px; }
@media (max-width: 1099px) and (min-width: 760px) {
  #pg-home.ac-home .ac-title { font-size: 42px; }
  .ac-entry-grid { gap: 14px; }
  .ac-entry-copy { padding: 18px; }
  #pg-home.ac-home .ac-entry h3 { font-size: 22px; }
  .ac-entry-copy > p { font-size: 14px; }
  .ac-section-head > p { max-width: 50%; }
  #pg-home.ac-home .hm-mine { grid-template-columns: 180px minmax(0,1fr); }
  #pg-home.ac-home .hm-mi-empty { flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 759px) {
  #pg-home.ac-home .ac-welcome { padding: 32px 0; }
  #pg-home.ac-home .ac-title { font-size: clamp(30px, 8.8vw, 40px); line-height: 1.45; margin: 12px 0; }
  #pg-home.ac-home .ac-intro { font-size: 15px; line-height: 1.85; }
  .ac-eyebrow { font-size: 12px; }
  .ac-welcome-actions { gap: 10px; margin-top: 24px; }
  #pg-home.ac-home .ac-welcome-actions :is(.btn,.btn-2) { font-size: 14px; min-height: 44px; padding: 10px 15px; }
  .ac-start { padding: 28px 0 24px; }
  .ac-section-head { display: block; margin-bottom: 18px; }
  #pg-home.ac-home .ac-section-head h2,
  #pg-home.ac-home #hm-new .sec-h .h2 { font-size: 25px; }
  .ac-section-head > p { margin-top: 6px; font-size: 13px; }
  .ac-entry-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .ac-cover { height: 136px; }
  .ac-entry-copy { padding: 20px 22px; }
  #pg-home.ac-home .ac-entry h3 { font-size: 24px; }
  .ac-entry-action { padding-top: 16px; }
  #pg-home.ac-home #hm-mine-band > .wrap { padding: 20px; }
  #pg-home.ac-home .hm-mine { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #pg-home.ac-home .hm-mi-empty { align-items: flex-start; flex-direction: column; gap: 6px; }
  #pg-home.ac-home > #hm-new { padding: 24px 0 28px; }
  #pg-home.ac-home .hm-cell.hm-cell-single { grid-template-columns: minmax(0,1fr); gap: 0; }
  #pg-home.ac-home .hm-cell-single .hm-card-copy { padding: 24px; }
  #pg-home.ac-home .hm-cell-single .cell-t { font-size: 24px; }
  #pg-home.ac-home .hm-cell-single .hm-img { padding: 20px 24px; }
  .ac-feedback { padding-bottom: 28px; }
  #pg-home.ac-home .hm-talk { gap: 16px; }
  .ac-ask { display: block; padding: 24px; margin-bottom: 32px; }
  #pg-home.ac-home .ac-ask h2 { font-size: 25px; }
  .ac-ask > .btn-2 { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-entry { transition: none; }
  .ac-entry:hover { transform: none; }
}

/* Shared front-of-house extension of the approved homepage.
 * Loaded only outside /admin. Navigation, controls, body copy and protected
 * screenshots keep their original typefaces and content. */
:root {
  --ac-panel: #fffefa;
  --ac-peach-soft: #f4e7dc;
  --ac-sage-soft: #e8eee7;
  --ac-lilac-soft: #eeeaf2;
}
html[data-theme="dark"] {
  --ac-panel: #2b2824;
  --ac-peach-soft: #3c3029;
  --ac-sage-soft: #2d3931;
  --ac-lilac-soft: #34303d;
}
html[lang="en"] { --ac-display: Georgia, "Times New Roman", serif; }
html main :is(h1, h2, h3, .h1, .h2, .h3),
html main :is(.cell-t, .empty-t),
html #pg-tools :is(.tl-title, .tc-n),
html #pg-tool :is(.tp-h1, .tp-verd, .tp-acc-t),
html #pg-asked :is(.ak-gt, .ak-row-q),
html #pg-ask .ask-mine .li-t,
html #pg-me :is(.me-name, .me-row-t, .me-arow-t, .me-q-r),
html #pg-rules :is(.ru-pt, .ru-no-t),
html #pg-login :is(.lg-stage-title, .lg-say-h, .lg-h),
html .sheet :is(h1, h2, h3, .h2, .h3) {
  font-family: var(--ac-display);
  font-weight: 400;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
/* Match the weight even where the original page uses a more specific heading rule. */
html #pg-tools .tc-big .tc-n,
html #pg-rules .ru-head .h1,
html #pg-me .me-side .h2 { font-family: var(--ac-display); font-weight: 400; }
html[lang="en"] main :is(h1, h2, h3, .h1, .h2, .h3) { letter-spacing: -.01em; }
html #pg-tools .tl-title,
html #pg-tool .tp-h1 { font-size: 48px; line-height: 1.3; }
html #pg-asked .ak-h1,
html #pg-ask .ask-head .h1 { font-size: 48px; line-height: 1.3; }
html #pg-rules .ru-head .h1 { font-size: 56px; line-height: 1.3; }
html #pg-question .q-title { line-height: 1.4; }
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) :is(.h2, h2) { line-height: 1.4; }
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) .band { padding-block: 48px; }
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) :is(.cell, .empty) {
  background: var(--ac-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--ac-shadow);
}
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) :is(.cell-t, .empty-t) { line-height: 1.45; }
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) :is(.btn, .btn-2),
.sheet :is(.btn, .btn-2), #pg-login .lg-go {
  border-radius: 10px;
  height: auto;
  min-height: 44px;
  max-width: 100%;
  padding-block: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
:is(.btn, .btn-2) > svg { flex-shrink: 0; }
:is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) :is(.input, .textarea, .search),
.sheet :is(.input, .textarea) { background-color: var(--ac-panel); }
:is(#pg-tools, #pg-asked, #pg-me) :is(.chips, .seg) { max-width: 100%; }
:is(#pg-tools, #pg-asked, #pg-me) :is(.chip, .seg button) {
  max-width: 100%;
  height: auto;
  min-height: 36px;
  padding-block: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

/* Tools: quiet filter panel and real previews on a small coloured mat. */
#pg-tools .tl-head { align-items: center; gap: 32px; }
#pg-tools .tl-filters { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--ac-panel); }
#pg-tools .fgroup > .lab { width: auto; min-width: 3em; }
#pg-tools .tc { border-radius: 16px; }
#pg-tools .tc-n { line-height: 1.45; }
#pg-tools .tc-thumb { background: var(--ac-peach-soft); }
#pg-tools .tc:nth-child(3n + 2) .tc-thumb { background: var(--ac-sage-soft); }
#pg-tools .tc:nth-child(3n) .tc-thumb { background: var(--ac-lilac-soft); }
#pg-tools .tc .tc-thumb:has(.protected-screen) {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 24px;
}
#pg-tools .tc .tc-thumb:has(.protected-screen) .tc-dev { width: 100%; transform: none; }
#pg-tools .tc-text { padding-bottom: 20px; }
#pg-tools .tc-flag { background: var(--ac-peach-soft); }
#pg-tools .tc-big .tc-n { font-size: 36px; line-height: 1.35; }
#pg-tools .tc-big .tc-foot { position: static; padding: 20px 32px; background: transparent; }
#pg-tools .tl-wants-box { background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; }
#pg-tools .tl-empty { padding: 40px 24px; }
#pg-tools :is(.tc-k, .tc-foot) { flex-wrap: wrap; }
#pg-tools .tl-foryou { background: var(--ac-panel); }

/* Tool detail: soften containers, leaving the uploaded image pixels unchanged. */
#pg-tool .tp-stage { background: var(--ac-peach-soft); border: 1px solid var(--line); border-radius: 16px; }
#pg-tool .tp-spec { padding: 4px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--ac-panel); }
#pg-tool .tp-spec > div:last-child { border-bottom: 0; }
html[lang="en"] #pg-tool .tp-ai-r { grid-template-columns: minmax(0, 1fr); gap: 6px; }
#pg-tool .tp-fit-g .tp-good { background: var(--ac-sage-soft); }
#pg-tool .tp-fit-g .tp-bad { background: var(--ac-panel); }
#pg-tool :is(.tp-prompt, .tp-acc) { border: 1px solid var(--line); border-radius: 16px; background: var(--ac-panel); }
#pg-tool .tp-acc { padding-inline: 24px; }
#pg-tool .tp-acc-i:last-child { border-bottom: 0; }
#pg-tool .tp-acc-b { flex-wrap: wrap; gap: 12px; }
#pg-tool .tp-acc-t { min-width: 0; flex: 1 1 220px; }
#pg-tool .tp-acc-s { white-space: normal; }
#pg-tool .tp-acc-ic { flex-shrink: 0; }
#pg-tool .tp-acts > form { min-width: 0; max-width: 100%; }
#pg-tool .tp-acts :is(.btn,.btn-2) { text-align: left; }
#pg-tool :is(.tp-priv, .tp-used) { background: var(--ac-panel); }
#pg-tool .tp-priv-k { height: auto; min-height: 28px; padding-block: 5px; }
#pg-tool .seg4-o { border-radius: 12px; }

/* Questions stay easy to scan, grouped inside the same paper cards. */
#pg-asked .ak-hero { padding-block: 48px 32px; background: var(--ac-welcome); border-bottom: 1px solid var(--line-2); }
#pg-asked .ak-panel { background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); }
#pg-asked .ak-group:nth-child(3n + 1) .ak-panel { border-top: 5px solid var(--ac-sage); }
#pg-asked .ak-group:nth-child(3n + 2) .ak-panel { border-top: 5px solid var(--ac-peach); }
#pg-asked .ak-group:nth-child(3n) .ak-panel { border-top: 5px solid var(--ac-lilac); }
#pg-asked .ak-row { padding-block: 24px; }
#pg-asked .ak-row-q { line-height: 1.5; }
#pg-asked .ak-open .list { padding: 0 24px; background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; }
#pg-asked .ak-open .li:last-child { border-bottom: 0; }
#pg-asked .ak-filters .filters { gap: 16px 24px; }
#pg-asked .ak-filters .fgroup { min-width: 0; }
#pg-asked :is(.ak-r-v,.ak-r-none,.ak-r-d) { white-space: normal; height: auto; min-height: 32px; padding-block: 6px; }
#pg-ask .ask-box { background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); }
#pg-ask .ask-box:focus-within { background: var(--ac-panel); }
#pg-ask .ask-ta { font-family: inherit; font-size: 24px; line-height: 1.6; }
#pg-ask .ask-stage { background: var(--ac-sage-soft); border: 1px solid var(--line); border-radius: 16px; }
#pg-ask .ask-rc { background: var(--ac-panel); }
#pg-ask .ask-toolchip { height: auto; min-height: 36px; max-width: 100%; padding-block: 6px; }
#pg-ask .ask-toolchip > span { min-width: 0; overflow-wrap: anywhere; }
#pg-ask .ask-fixed { min-width: 0; }
#pg-question .q-priv { background: var(--ac-lilac-soft); border: 1px solid var(--line); border-radius: 16px; }
#pg-question .q-body { padding: 32px; background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; margin-top: 40px; }
#pg-question .q-body .q-part:first-child { margin-top: 0; }
#pg-question .q-prompt { background: var(--ac-welcome); border: 1px solid var(--line); border-radius: 12px; }
#pg-question .q-dev { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); }
#pg-question .q-dev .device-bar { background: var(--ac-sage-soft); }
#pg-question .q-dev .device-body { background: var(--ac-panel); }
#pg-question .q-dev .device-foot { background: var(--ac-panel); }
#pg-question .q-dev .device-foot > span { white-space: normal; }
#pg-question .q-tool .stage { background: var(--ac-peach-soft); border-radius: 16px; }

/* Private member page: a flat personal card and consistent content panels. */
#pg-me .me-stage { padding: 40px; min-height: 440px; background: var(--ac-lilac-soft); border: 1px solid var(--line); border-radius: 16px; }
#pg-me .me-card-back { display: none; }
#pg-me .me-card { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); background: var(--ac-panel); color: var(--ink); }
#pg-me .me-card-ft { background: var(--ac-lilac-soft); border-color: var(--line); }
#pg-me .me-label, #pg-me .me-card :is(.k,.me-did-n,.me-card-who) { color: var(--ink-2); }
#pg-me .me-card-facts, #pg-me .me-card-facts > div + div { border-color: var(--line); }
#pg-me .me-name { line-height: 1.4; }
#pg-me :is(.me-row,.me-q,.me-empty,.me-sys-c,.me-out,.me-fork) { background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); }
#pg-me .me-row { min-width: 0; }
#pg-me .me-row-t { flex-wrap: wrap; }
#pg-me .me-row-t .me-ver { font-family: "PHT", sans-serif; }
#pg-me .me-sys-grid > section { min-width: 0; }
#pg-me .me-jump { flex-wrap: wrap; row-gap: 16px; }
#pg-me .me-jump-i { min-width: 0; }
#pg-me .me-jump-i span { white-space: normal; }
#pg-me .me-sys-grid .session-row { gap: 16px; }
#pg-me .me-sys-grid .session-row > div { min-width: 0; overflow-wrap: anywhere; }
#pg-me .me-sys-grid .session-row > form { flex-shrink: 0; }
#pg-me :is(.me-q,.me-row):hover { transform: none; }

/* Rules use three calm coloured cards; the detailed reading sections stay plain. */
#pg-rules .ru-pillars { gap: 20px; border-top: 0; }
#pg-rules .ru-pillar { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--ac-peach-soft); }
#pg-rules .ru-pillar:first-child { padding-left: 28px; }
#pg-rules .ru-pillar:last-child { padding-right: 28px; }
#pg-rules .ru-pillar:nth-child(2) { background: var(--ac-sage-soft); }
#pg-rules .ru-pillar:nth-child(3) { background: var(--ac-lilac-soft); }
#pg-rules .ru-pillar + .ru-pillar { border-left: 1px solid var(--line); }
#pg-rules .ru-pt { word-break: normal; overflow-wrap: anywhere; }
#pg-rules .ru-n { font-family: Georgia, serif; font-size: 40px; font-weight: 400; color: var(--ink-2); }
#pg-rules .ru-stage { background: var(--ac-welcome); border: 1px solid var(--line); border-radius: 16px; }
#pg-rules .ru-table { padding-inline: 24px; background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; }
#pg-rules .ru-tr:last-child { border-bottom: 0; }

/* Login and action dialogs belong to the same visual family. */
#pg-login .lg-stage-in { background: var(--ac-welcome); border: 1px solid var(--line); border-radius: 16px; justify-content: center; }
#pg-login .lg-stage-title { line-height: 1.45; }
#pg-login .lg-stage-text { max-width: 30em; line-height: 1.8; }
#pg-login .lg-box { max-width: 460px; padding: 32px; margin-block: auto; flex: 0 0 auto; background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--ac-shadow); }
#pg-login .lg-side { gap: 24px; }
#pg-login .lg-h { font-size: 28px; }
#pg-login .lg-to { flex-wrap: wrap; }
#pg-login .lg-to > span { white-space: normal; overflow-wrap: anywhere; }
#pg-login .lg-cells { min-width: 0; }
#pg-login .lg-cells input { min-width: 0; }
.sheet { background: var(--ac-panel); border: 1px solid var(--line); border-radius: 16px; }
.sheet :is(.h2,h2) { padding-right: 28px; line-height: 1.4; }
.sheet .row-x { min-width: 0; flex-wrap: wrap; }
.sheet :is(p, .form-note, .lab) { overflow-wrap: anywhere; }

@media (max-width: 1099px) {
  #pg-tool .tp-hero-g { gap: 32px; }
  #pg-me .me-stage { min-height: 0; }
  #pg-login .lg-box { margin-block: 0; }
  #pg-login .lg-stage-in { height: auto; min-height: 320px; }
}
@media (max-width: 759px) {
  html #pg-tools .tl-title, html #pg-tool .tp-h1,
  html #pg-asked .ak-h1, html #pg-ask .ask-head .h1,
  html #pg-rules .ru-head .h1 { font-size: 34px; line-height: 1.4; }
  :is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) .band { padding-block: 32px; }
  :is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules) .h2 { font-size: 28px; }
  #pg-tools .tl-filters { padding: 20px 16px; }
  #pg-tools .fgroup { gap: 10px; }
  #pg-tools .fgroup > .lab { min-width: 0; width: auto; }
  #pg-tools .tc-big .tc-n { font-size: 28px; }
  #pg-tools .tc-big .tc-foot { padding: 16px 24px 20px; }
  #pg-tool .tp-spec { padding-inline: 16px; }
  #pg-tool .tp-spec > div { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  #pg-tool .tp-acc { padding-inline: 20px; }
  #pg-tool .tp-acc-t { flex-basis: 160px; }
  #pg-tool .tp-acts { gap: 10px; }
  #pg-tool .tp-acts > :is(form, a) { flex: 1 1 100%; }
  #pg-tool .tp-acts > form > button { width: 100%; }
  #pg-asked .ak-filters .fgroup { flex-wrap: wrap; overflow: visible; }
  #pg-asked .ak-filters .chips { flex-wrap: wrap; min-width: 0; }
  #pg-asked .ak-panel { padding-inline: 20px; }
  #pg-asked .ak-row-q { font-size: 21px; }
  #pg-asked .ak-row-r { align-items: flex-start; }
  #pg-asked .ak-open .list { padding-inline: 20px; }
  #pg-ask .ask-ta { font-size: 21px; }
  #pg-ask .ask-box { padding: 20px 16px 16px; }
  #pg-ask .ask-fixed { align-items: flex-start; }
  #pg-ask .ask-fixed > svg { flex-shrink: 0; }
  #pg-ask .m3-draft-meta { flex-wrap: wrap; gap: 6px 12px; }
  #pg-question .q-body { padding: 24px 20px; }
  #pg-question .q-read { gap: 32px; }
  #pg-question .q-title.keep { word-break: normal; }
  #pg-question .q-part .between { gap: 12px; flex-wrap: wrap; }
  #pg-me .me-stage { padding: 20px 16px; }
  #pg-me .me-card { padding-inline: 20px; }
  #pg-me .me-label > span, #pg-me .me-nw { white-space: normal; }
  #pg-me .me-jump-i { padding-inline: 12px; }
  #pg-me .me-empty .lnk-a { white-space: normal; }
  #pg-me .me-sys-grid { gap: 28px; }
  #pg-rules .ru-pillars { gap: 16px; margin-top: 28px; }
  #pg-rules .ru-pillar, #pg-rules .ru-pillar:first-child, #pg-rules .ru-pillar:last-child { padding: 24px; }
  #pg-rules .ru-table { padding-inline: 20px; }
  #pg-login .lg-box { padding: 24px 20px; }
  #pg-login .lg-stage-in { padding: 28px 24px; min-height: 0; }
  #pg-login .lg-stage-title { font-size: 32px; }
  #pg-login .lg-form { margin-top: 28px; }
  #pg-login .lg-go { padding-inline: 16px; }
  .sheet { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules, #pg-login, .sheet) *,
  :is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules, #pg-login, .sheet) *::before,
  :is(#pg-tools, #pg-tool, #pg-asked, #pg-ask, #pg-question, #pg-me, #pg-rules, #pg-login, .sheet) *::after { transition-duration: 0s; animation: none; }
}

/* Real, optional resource evidence stays compact within the homepage card. */
#pg-home.ac-home .hm-card-stats { margin-top: 20px; max-width: 360px; }
#pg-home.ac-home .hm-card-stats .delta { flex-wrap: wrap; gap: 6px; }
#pg-home.ac-home .hm-card-stats .delta .from { font-size: 21px; }
#pg-home.ac-home .hm-card-stats .delta .to { font-size: 32px; }
#pg-home.ac-home .hm-card-stats .delta-cap { font-size: 14px; line-height: 1.6; margin-top: 8px; }
#pg-home.ac-home .hm-card-check { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
#pg-home.ac-home .hm-card-check .ok { align-items: flex-start; white-space: normal; overflow-wrap: anywhere; }
#pg-home.ac-home .hm-card-check .ok > svg { flex-shrink: 0; margin-top: 3px; }
#pg-home.ac-home .hm-bars i { background: var(--ink-2); }
#pg-home.ac-home .hm-bars b { color: var(--ink-2); white-space: normal; text-align: center; }
@media (max-width: 759px) {
  #pg-home.ac-home .hm-card-stats { margin-top: 16px; }
  #pg-home.ac-home .hm-card-stats .hm-bars { display: grid; }
}
