:root {
  color-scheme: light;
  --navy: #15314a;
  --ink: #1d3447;
  --muted: #4e6270;
  --paper: #fffefa;
  --canvas: #f2f4f3;
  --line: #cdd8da;
  --field-line: #879ca3;
  --teal: #21626c;
  --teal-deep: #174c56;
  --teal-wash: #eaf4f2;
  --bronze: #7d511b;
  --brass: #d5b17b;
  --bronze-wash: #f8f0df;
  --stop: #8b3e36;
  --stop-wash: #f9ece8;
  --content-width: 76rem;
  --gutter: 2rem;
  --panel-pad: 1.75rem;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  line-height: 1.6;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

body, button, textarea {
  font-family: inherit;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.3;
  text-wrap: balance;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: .19em;
}

button, textarea {
  font-size: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .58;
}

:where(a, button, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

::selection {
  background: #cce7e1;
  color: var(--navy);
}

[hidden] {
  display: none !important;
}

.masthead {
  background: var(--navy);
  color: var(--paper);
  border-bottom: 2px solid var(--brass);
}

.masthead-inner, .intro-inner, .workbench, .source-section, .site-footer {
  width: min(calc(100% - 2 * var(--gutter)), var(--content-width));
  margin-inline: auto;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  min-height: 4.75rem;
  padding-block: .8rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 2.375rem;
  width: 2.375rem;
  height: 2.375rem;
  color: #f0cf9a;
  border: 1px solid #c4a578;
  border-radius: .42rem;
}

.brand-mark svg {
  width: 1.35rem;
  height: 1.35rem;
}

.brand-line {
  display: block;
  color: inherit;
  font-weight: 700;
}

.masthead-note {
  color: #cbdce4;
  font-size: .82rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: #e4eef3;
  font-size: .875rem;
}

.masthead :focus-visible {
  outline-color: #f0cf9a;
}

.intro {
  padding-block: 2.55rem 2.15rem;
}

.eyeline, .panel-kicker {
  color: var(--bronze);
  font-size: .8125rem;
  font-weight: 700;
}

.intro h1 {
  margin-block: .3rem .52rem;
  font-size: 2.4rem;
  font-weight: 750;
  letter-spacing: -.028em;
}

.intro p:not(.eyeline) {
  max-width: 69ch;
  color: var(--muted);
  font-size: 1rem;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: 1.125rem;
  align-items: stretch;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--panel-pad);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .875rem;
}

.panel-top, .result-top {
  margin-bottom: 1.1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .6rem 1rem;
}

.panel h2, .source-section h2 {
  font-size: 1.32rem;
  font-weight: 720;
}

.panel-kicker + h2 {
  margin-top: .2rem;
}

.panel form > label {
  display: block;
  margin-bottom: .24rem;
  color: var(--navy);
  font-weight: 650;
}

.field-hint, .fields-help {
  color: var(--muted);
  font-size: .875rem;
}

.example-group, .form-actions, .source-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.example-group {
  margin-block: .75rem;
}

.example-button, .primary, .secondary {
  min-height: 2.75rem;
  padding: .6rem .9rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  font-weight: 650;
  line-height: 1.35;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.example-button {
  padding-inline: .7rem;
  border-color: #c3d5d4;
  background: #eff5f4;
  color: var(--teal-deep);
  font-size: .85rem;
}

.example-button:hover:not(:disabled), .example-button[aria-pressed="true"] {
  border-color: var(--teal);
  background: #e0efed;
}

.case-text {
  display: block;
  width: 100%;
  min-height: 12rem;
  margin-block: .6rem 0;
  padding: .85rem .9rem;
  resize: vertical;
  border: 1px solid var(--field-line);
  border-radius: .45rem;
  background: #fff;
  color: var(--ink);
  caret-color: var(--teal);
  line-height: 1.7;
}

.case-text::placeholder {
  color: var(--muted);
  opacity: 1;
}

.case-text:focus {
  border-color: var(--teal);
}

.case-text[aria-invalid="true"] {
  border-color: var(--stop);
}

.form-actions {
  margin-top: .85rem;
}

.primary {
  background: var(--teal);
  color: #fff;
  padding-inline: 1.12rem;
}

.primary:hover:not(:disabled) {
  background: var(--teal-deep);
}

.primary:active:not(:disabled) {
  background: var(--navy);
}

.secondary {
  border-color: var(--field-line);
  background: var(--paper);
  color: var(--ink);
}

.secondary:hover:not(:disabled) {
  background: #eef3f4;
  border-color: var(--teal);
}

.fields-help {
  margin-top: 1.15rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
}

.fields-help summary {
  width: fit-content;
  color: var(--teal-deep);
  cursor: pointer;
  font-weight: 650;
}

.fields-help ul {
  margin-block: .5rem 0;
  padding-inline-start: 1.25rem;
}

.status-chip, .check-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .23rem .58rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #edf2f3;
  color: var(--muted);
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.4;
}

.status-ready, .check-ok {
  border-color: #bdd7cf;
  background: var(--teal-wash);
  color: var(--teal-deep);
}

.status-missing, .check-missing {
  border-color: #e5d4ad;
  background: var(--bronze-wash);
  color: var(--bronze);
}

.status-stopped {
  border-color: #e6c6bf;
  background: var(--stop-wash);
  color: var(--stop);
}

.check-neutral {
  border-color: #d3dee0;
  background: #edf2f3;
  color: var(--muted);
}

.empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .5rem;
  flex: 1;
  min-height: 18rem;
  padding: 1.5rem;
  color: var(--muted);
  background: #f4f7f7;
  border: 1px dashed #b7cbcf;
  border-radius: .5rem;
  text-align: center;
}

.empty-state > p {
  max-width: 37ch;
  font-size: .91rem;
}

.empty-symbol {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: .25rem;
  border: 1px solid #bfd4d4;
  border-radius: .55rem;
  color: var(--teal);
  background: #e7f0ef;
}

.empty-symbol svg {
  width: 1.35rem;
  height: 1.35rem;
}

.result-body {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  font-size: .94rem;
  overflow-wrap: anywhere;
}

.result-block + .result-block {
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.result-block h3 {
  margin-bottom: .5rem;
  font-size: 1.02rem;
}

.result-block p + p {
  margin-top: .5rem;
}

.result-block :where(ul, ol):not(.check-list) {
  margin-block: .4rem 0;
  padding-inline-start: 1.25rem;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  padding-block: .45rem;
  border-bottom: 1px solid #e0e8e8;
}

.draft {
  margin: .45rem 0 0;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: .42rem;
  background: #f4f7f7;
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

textarea.draft {
  width: 100%;
  min-height: 9rem;
  resize: vertical;
}

.source-links {
  margin-block: .5rem 0;
  gap: .3rem 1rem;
}

.source-links a {
  padding-block: .45rem;
}

.source-section {
  margin-top: 1.8rem;
  padding-block: 1.2rem 1.45rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.source-section > p {
  margin-block: .4rem .85rem;
  color: var(--muted);
  font-size: .875rem;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0 1.3rem;
  margin: .7rem 0 0;
  padding: 0;
  list-style: none;
}

.source-item {
  min-width: 0;
  padding-block: .65rem .8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.source-item a {
  font-weight: 650;
}

.site-footer {
  padding-block: .85rem 1.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 54rem) {
  :root {
    --gutter: 1.25rem;
    --panel-pad: 1.25rem;
  }

  .intro {
    padding-block: 2rem 1.6rem;
  }

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

  .empty-state {
    min-height: 12rem;
  }
}

@media (max-width: 29rem) {
  :root {
    --gutter: .9rem;
    --panel-pad: 1rem;
  }

  .masthead-inner {
    gap: .15rem .8rem;
  }

  .intro h1 {
    font-size: 1.85rem;
  }

  .case-text {
    min-height: 10rem;
  }

  .source-section {
    margin-top: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .example-button, .primary, .secondary {
    transition: none;
  }
}
