:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: .23em; }
a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(calc(100% - 3rem), 74rem); margin-inline: auto; }
.skip { position: absolute; inset: .5rem auto auto .5rem; transform: translateY(-200%); z-index: 1; background: white; color: black; padding: .45rem; }
.skip:focus { transform: translateY(0); }

.top { background: var(--banner); color: var(--on-banner); border-bottom: 1px solid var(--banner-line); }
.top .wrap { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .62rem; font-weight: 750; text-decoration: none; letter-spacing: -.025em; white-space: nowrap; }
.mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .45rem; background: var(--badge); color: var(--badge-ink); font: 700 .83rem ui-monospace, monospace; }
.top nav { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .91rem; }
.top nav a { text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { text-decoration: underline; }
.hero { background: var(--banner); color: var(--on-banner); padding: clamp(3rem, 7.5vw, 6.4rem) 0 clamp(2.5rem, 6vw, 4.7rem); }
.hero h1 { font-family: var(--display); max-width: 18ch; font-size: clamp(2.45rem, 6vw, 5rem); font-weight: var(--display-weight); letter-spacing: -.055em; line-height: 1.04; text-wrap: balance; }
.hero p { margin-top: .85rem; max-width: 45ch; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--banner-muted); }

.workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); gap: 1.1rem; align-items: start; padding-block: 1.7rem 3rem; }
.box { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: clamp(1rem, 3vw, 1.65rem); }
.box h2 { font-size: 1.28rem; line-height: 1.23; letter-spacing: -.024em; }
.box p { margin-top: .44rem; color: var(--muted); }
.box label { display: block; margin-top: .85rem; font-weight: 630; }
.box input, .box select, .box textarea {
  width: 100%;
  min-width: 0;
  margin-top: .29rem;
  border: 1px solid var(--field);
  border-radius: .4rem;
  padding: .61rem .75rem;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.box textarea { display: block; resize: vertical; }
.box .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.round-robin ol { list-style: none; padding-inline-start: 0; overflow-wrap: anywhere; }
.round-robin ol > li + li { margin-top: .65rem; }
.button {
  min-height: 2.7rem;
  border: 1px solid var(--accent);
  border-radius: .43rem;
  padding: .58rem .88rem;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button:disabled { opacity: .5; cursor: default; }
.button:hover:enabled { filter: brightness(1.14); }
.action { display: flex; align-items: baseline; flex-wrap: wrap; gap: .65rem; margin-top: 1.05rem; }
.caption { color: var(--muted); font-size: .86rem; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.log-table { width: 100%; margin-top: .85rem; border-collapse: collapse; overflow-wrap: anywhere; font-size: .87rem; }
.log-table th, .log-table td { padding: .65rem .45rem; text-align: left; border-bottom: 1px solid var(--line); }
.log-table th { color: var(--muted); font-weight: 670; }
.log-table .row-label { display: none; }
.text-button { border: 0; padding: .24rem; color: var(--accent); background: none; font: inherit; text-decoration: underline; cursor: pointer; }
.log-empty { padding: 1.05rem 0 .35rem; }
.recommend ol { margin-block: .72rem 1.2rem; padding-left: 1.55rem; }
.recommend li { padding-left: .16rem; margin-top: .45rem; }
.recommend textarea { font: .88rem/1.55 ui-monospace, monospace; background: var(--canvas); }

.guides { padding: 0 0 4.5rem; }
.guides h2 { font-size: 1.42rem; margin-bottom: .85rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.guide-grid a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: .6rem; padding: .9rem 1.1rem; text-decoration: none; }
.guide-grid a:hover strong { text-decoration: underline; }
.guide-grid p { margin-top: .31rem; font-size: .9rem; color: var(--muted); }
.article { max-width: 48rem; padding-block: 2.85rem 4rem; }
.article h1 { font-family: var(--display); font-size: clamp(2.25rem, 5.6vw, 4rem); font-weight: var(--display-weight); line-height: 1.07; letter-spacing: -.047em; margin-top: .9rem; }
.article .lead { margin-top: .82rem; font-size: 1.12rem; color: var(--muted); }
.article section { margin-top: 1.55rem; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.article section p { margin-top: .4rem; }
.article .return { margin-top: 1.8rem; }
.article header > a, .article .return, .resources a { color: var(--accent); }
.resources ul { padding-left: 1.3rem; margin-bottom: 0; }
.foot { color: var(--muted); border-top: 1px solid var(--line); }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .48rem 1rem; padding-block: 1.15rem; font-size: .91rem; }

.visibility {
  --canvas: #f2f4e9;
  --panel: #fffef9;
  --ink: #142a1f;
  --muted: #425d4d;
  --banner: #173b2d;
  --on-banner: #fffdf1;
  --banner-muted: #cce0cf;
  --banner-line: #527566;
  --line: #d4dccd;
  --field: #a3b4a4;
  --badge: #c9eda1;
  --badge-ink: #1b3427;
  --accent: #24563d;
  --on-accent: #fffef1;
  --focus: #397859;
  --display: Georgia, serif;
  --display-weight: 400;
}

.triage {
  --canvas: #edf1fb;
  --panel: white;
  --ink: #18243c;
  --muted: #455672;
  --banner: #202f5c;
  --on-banner: #f8f9ff;
  --banner-muted: #dce3fa;
  --banner-line: #6f80b2;
  --line: #d1daef;
  --field: #a0afd0;
  --badge: #ced9ff;
  --badge-ink: #1c3269;
  --accent: #314db1;
  --on-accent: white;
  --focus: #516ce2;
  --display: system-ui, sans-serif;
  --display-weight: 770;
}
.triage .workspace { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.triage .guide-grid a { border-top: 3px solid var(--badge); }

.migration {
  --canvas: #f8f3e7;
  --panel: #fffdfa;
  --ink: #2a211a;
  --muted: #604a39;
  --banner: #f4dcaa;
  --on-banner: #35251e;
  --banner-muted: #594234;
  --banner-line: #cfa86b;
  --line: #e0ccb0;
  --field: #ad8e6f;
  --badge: #754024;
  --badge-ink: #fff4de;
  --accent: #824329;
  --on-accent: #fff8e8;
  --focus: #964f22;
  --display: "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --display-weight: 770;
}
.migration .hero h1 { letter-spacing: -.045em; max-width: 28ch; }
.migration .workspace { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.migration .result-list li { align-items: flex-start; flex-direction: column; }

.digest {
  --canvas: #eef0f5;
  --panel: white;
  --ink: #20253a;
  --muted: #4c5570;
  --banner: #252641;
  --on-banner: #fafaff;
  --banner-muted: #d5d7ed;
  --banner-line: #666b98;
  --line: #d6d9e8;
  --field: #9da6c2;
  --badge: #dce6b5;
  --badge-ink: #252641;
  --accent: #423e86;
  --on-accent: white;
  --focus: #6552ad;
  --display: system-ui, sans-serif;
  --display-weight: 780;
}
.digest textarea { font: .84rem/1.55 ui-monospace, monospace; }
.digest-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .8rem; }
.digest-metrics div { background: var(--canvas); padding: .62rem; border-radius: .38rem; }
.digest-metrics dt { color: var(--muted); font-size: .73rem; }
.digest-metrics dd { margin: 0; font-weight: 730; overflow-wrap: anywhere; }
.result-list { padding: 0; margin: .75rem 0; list-style: none; }
.result-list li { display: flex; justify-content: space-between; gap: .28rem .7rem; border-top: 1px solid var(--line); padding: .58rem 0; overflow-wrap: anywhere; font-size: .88rem; }
.result-list .positive { color: #30663c; }
.result-list .negative { color: #9c302e; }

.model-lab {
  --canvas: #edf3f4;
  --panel: #fff;
  --ink: #12303a;
  --muted: #3e5c65;
  --banner: #103d4b;
  --on-banner: #f8fcfd;
  --banner-muted: #c9e4e9;
  --banner-line: #48707c;
  --line: #cadce1;
  --field: #869fa7;
  --badge: #a5e7dd;
  --badge-ink: #12303a;
  --accent: #065969;
  --on-accent: #fff;
  --focus: #00758a;
  --display: system-ui, sans-serif;
  --display-weight: 760;
}
.model-lab .hero { padding-block: clamp(2.5rem, 5vw, 4.25rem); }
.model-lab input::file-selector-button {
  padding: .35rem .6rem;
  margin-inline-end: .5rem;
  border: 0;
  border-radius: .28rem;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  cursor: pointer;
}
.model-status { overflow-wrap: anywhere; }
.model-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: .5rem;
  margin: .92rem 0 0;
}
.model-metrics div { padding: .55rem .65rem; background: var(--canvas); border-radius: .35rem; }
.model-metrics dt { color: var(--muted); font-size: .8rem; }
.model-metrics dd { margin: 0; color: var(--accent); font-size: 1.35rem; font-weight: 700; }

.indexing {
  --canvas: #eef0f6;
  --panel: #fff;
  --ink: #1c2642;
  --muted: #495878;
  --banner: #1c2953;
  --on-banner: #f8faff;
  --banner-muted: #d6e1ff;
  --banner-line: #52638e;
  --line: #d7ddee;
  --field: #919eb7;
  --badge: #d4e1ff;
  --badge-ink: #19264e;
  --accent: #253e92;
  --on-accent: #fff;
  --focus: #395bd0;
  --display: system-ui, sans-serif;
  --display-weight: 760;
}
.box .indexing-action-title { margin-top: .9rem; color: var(--accent); font-weight: 750; }
.indexing-result .caption { padding-top: .85rem; border-top: 1px solid var(--line); margin-top: 1rem; }

.chords {
  --canvas: #f5efe6;
  --panel: #fffdfa;
  --ink: #362038;
  --muted: #5c4760;
  --banner: #42284c;
  --on-banner: #fff9ed;
  --banner-muted: #eddaee;
  --banner-line: #836786;
  --line: #e8d9e3;
  --field: #a697a8;
  --badge: #f5d6a2;
  --badge-ink: #3c2633;
  --accent: #723c71;
  --on-accent: #fff9fc;
  --focus: #874188;
  --display: Georgia, serif;
  --display-weight: 600;
}
.chords textarea { font-family: ui-monospace, monospace; }
.chords textarea[readonly] { background: var(--canvas); }
.chords .hero, .indexing .hero { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.pillow-fit {
  --canvas: #edf4f2;
  --panel: #fcfefd;
  --ink: #183636;
  --muted: #405c5b;
  --banner: #cfebe4;
  --on-banner: #153b39;
  --banner-muted: #355854;
  --banner-line: #a0c8c0;
  --line: #c3d8d4;
  --field: #7f9a96;
  --badge: #225c56;
  --badge-ink: #f7fffc;
  --accent: #205d56;
  --on-accent: #fff;
  --focus: #1d6e65;
  --display: Georgia, serif;
  --display-weight: 400;
}
.pillow-fit .model-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.beat-tempo {
  color-scheme: dark;
  --canvas: #191923;
  --panel: #242433;
  --ink: #faf6ef;
  --muted: #c0becf;
  --banner: #11111c;
  --on-banner: #fff4df;
  --banner-muted: #cec7da;
  --banner-line: #474458;
  --line: #4b485d;
  --field: #8a849d;
  --badge: #f5bf72;
  --badge-ink: #321a16;
  --accent: #f5bf72;
  --on-accent: #2e1b15;
  --focus: #f9d39d;
  --display: system-ui, sans-serif;
  --display-weight: 780;
}
.beat-tempo .model-metrics dd { font-variant-numeric: tabular-nums; }

.campaign-links {
  --canvas: #f1eef5;
  --panel: #fffdfd;
  --ink: #241b32;
  --muted: #5e516d;
  --banner: #352445;
  --on-banner: #fff4e7;
  --banner-muted: #e4d8ed;
  --banner-line: #776086;
  --line: #d9cfe0;
  --field: #9e8cab;
  --badge: #fbd2ac;
  --badge-ink: #472844;
  --accent: #603271;
  --on-accent: #fff;
  --focus: #853d94;
  --display: Georgia, serif;
  --display-weight: 400;
}

.creative-brief {
  --canvas: #f6f0e9;
  --panel: #fffdfa;
  --ink: #291d22;
  --muted: #624e56;
  --banner: #542f3d;
  --on-banner: #ffefdf;
  --banner-muted: #f6d9d8;
  --banner-line: #9f6a79;
  --line: #dacac8;
  --field: #ac929a;
  --badge: #f4cbbc;
  --badge-ink: #592d3d;
  --accent: #763b50;
  --on-accent: #fff5ef;
  --focus: #943e60;
  --display: Georgia, serif;
  --display-weight: 400;
}

.travel-transfer {
  --canvas: #eff2f6;
  --panel: #fdfefe;
  --ink: #1e3042;
  --muted: #4a6070;
  --banner: #133a58;
  --on-banner: #fbf9ed;
  --banner-muted: #d0e2ed;
  --banner-line: #68839b;
  --line: #cad7e1;
  --field: #879fb3;
  --badge: #f9db9c;
  --badge-ink: #313041;
  --accent: #164f78;
  --on-accent: #fff;
  --focus: #14659b;
  --display: system-ui, sans-serif;
  --display-weight: 750;
}
.travel-transfer .model-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sheet-pocket, .case-wash, .comforter-drop {
  --canvas: #f2f5f3;
  --panel: #fffefd;
  --ink: #233b37;
  --muted: #4a5c58;
  --banner: #d6ece7;
  --on-banner: #183c37;
  --banner-muted: #395b54;
  --banner-line: #a0c6ba;
  --line: #cad8d4;
  --field: #829d95;
  --badge: #266258;
  --badge-ink: #fff;
  --accent: #27655b;
  --on-accent: #fff;
  --focus: #147d70;
  --display: Georgia, serif;
  --display-weight: 400;
}
.case-wash {
  --canvas: #f5f0f7;
  --ink: #312638;
  --muted: #62536b;
  --banner: #ebddee;
  --on-banner: #3b2b44;
  --banner-muted: #5e4b66;
  --banner-line: #c3a7c9;
  --line: #ddd0e1;
  --field: #a18ba6;
  --badge: #694871;
  --accent: #694871;
  --focus: #8c4791;
}
.comforter-drop {
  --canvas: #f8f2ed;
  --ink: #352920;
  --muted: #66554b;
  --banner: #ead7c5;
  --on-banner: #422f23;
  --banner-muted: #664f40;
  --banner-line: #c5aa91;
  --line: #dfd1c4;
  --field: #a08b78;
  --badge: #754c38;
  --accent: #794c36;
  --focus: #9c5d30;
}
.textile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.texture-budget {
  color-scheme: dark;
  --canvas: #1b2029;
  --panel: #252d39;
  --ink: #eff7fc;
  --muted: #bdcbd9;
  --banner: #121b26;
  --on-banner: #f1fbfe;
  --banner-muted: #b7d2e5;
  --banner-line: #41556d;
  --line: #425366;
  --field: #8599af;
  --badge: #9fe2ee;
  --badge-ink: #192e3d;
  --accent: #a0e2e9;
  --on-accent: #192e3d;
  --focus: #c3f5fc;
  --display: system-ui, sans-serif;
  --display-weight: 780;
}
.traffic-change {
  --canvas: #f6f3e8;
  --panel: #fffdf6;
  --ink: #2e2a22;
  --muted: #655a46;
  --banner: #e8deb7;
  --on-banner: #3a3221;
  --banner-muted: #63563a;
  --banner-line: #baa87e;
  --line: #ded4bb;
  --field: #9b8d70;
  --badge: #695629;
  --badge-ink: #fffbeb;
  --accent: #685326;
  --on-accent: #fff9e6;
  --focus: #8b671e;
  --display: Georgia, serif;
  --display-weight: 400;
}
.texture-budget .model-metrics dd, .traffic-change .model-metrics dd { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .top .wrap { flex-wrap: wrap; padding-block: .7rem; }
  .workspace, .triage .workspace, .migration .workspace, .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .log-table, .log-table tbody { display: block; }
  .log-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .log-table tbody tr { display: block; border-block-start: 1px solid var(--line); padding: .52rem 0 .7rem; }
  .log-table tbody td { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .55rem; border: 0; padding: .24rem 0; }
  .log-table .row-label { display: block; font-weight: 650; }
  .log-table .row-action { display: block; text-align: right; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 1.5rem); }
  .top nav { gap: .4rem 1.05rem; font-size: .85rem; }
  .box .split { grid-template-columns: minmax(0, 1fr); }
}
