:root {
  color-scheme: light;
  --ink: #183344;
  --muted: #58717e;
  --line: #d7e3e8;
  --bg: #f1f6f8;
  --paper: #fff;
  --teal: #007d80;
  --navy: #132d40;
  --amber: #875200;
  --red: #a33b3b;
  font:
    15px/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.62rem 1rem;
  color: var(--ink);
  font-weight: 600;
}
button:hover {
  background: #eaf3f5;
  border-color: #93b5c0;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.primary:hover {
  background: #006568;
}
a {
  color: #006f80;
}
input,
select {
  width: 100%;
  border: 1px solid #b9ced7;
  border-radius: 7px;
  padding: 0.58rem 0.65rem;
  background: #fff;
  min-height: 42px;
  color: var(--ink);
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #7bd3d4;
  outline-offset: 2px;
}
input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin-right: 0.6rem;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #405c6a;
}
label input,
label select {
  display: block;
  margin-top: 0.35rem;
}
label.check {
  font-size: 0.94rem;
  display: flex;
  align-items: start;
  gap: 0.4rem;
}
label.check input {
  display: inline;
  margin-top: 0.35rem;
}
.top {
  background: var(--navy);
  color: #fff;
  padding: 1.5rem max(1.5rem, calc((100vw - 1360px) / 2));
  border-bottom: 4px solid #14b1ae;
}
.top h1 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin: 0.1rem 0;
}
.top p {
  margin: 0.35rem 0;
  color: #b8d2dc;
  max-width: 1000px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #76ded7;
}
.version {
  float: right;
  color: #b8d2dc;
  font-size: 0.8rem;
}
.workspace {
  max-width: 1408px;
  margin: auto;
  padding: 1.3rem 1.5rem 4rem;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.toolbar select {
  width: auto;
  min-width: 245px;
}
.spacer {
  flex: 1;
}
.badge {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.3rem 0.65rem;
  display: inline-block;
  background: #edf5f7;
}
.badge.demo {
  background: #fff0d8;
  color: #865000;
  border-color: #eac690;
}
.badge.warn {
  background: #fff3dd;
  color: #875200;
}
.badge.bad {
  background: #fceaea;
  color: #a33b3b;
}
.badge.info {
  background: #e3f4f3;
  color: #00676d;
}
.statusbar {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.statusbox {
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #fff;
}
.statusbox small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}
.statusbox strong {
  font-size: 0.92rem;
}
.notice {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin: 0.75rem 0;
  border-left: 4px solid #e0ab4d;
  background: #fff6e5;
  color: #785018;
}
.notice.error {
  background: #ffeded;
  border-color: #bb4545;
  color: #943232;
}
.notice.info {
  background: #e6f4f5;
  border-color: #159497;
  color: #255864;
}
.notice p {
  margin: 0.25rem 0;
}
.tabs {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid #c5d9df;
  margin: 1.2rem 0 1.4rem;
  overflow-x: auto;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--muted);
  padding: 0.8rem 1rem;
  border-bottom: 3px solid transparent;
}
.tabs button[aria-selected="true"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: #fff;
}
.panel-title {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.panel-title h2 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  margin: 0;
}
.panel-title p {
  margin: 0.25rem 0;
  color: var(--muted);
  max-width: 820px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 4px #13344404;
}
.card h3 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}
.card h4 {
  margin: 1.1rem 0 0.6rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.15rem;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.2rem;
  align-items: start;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8rem;
}
.section-note {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}
.row > p {
  margin: 0.3rem 0;
}
.stack {
  display: grid;
  gap: 0.6rem;
}
.rule-list {
  padding: 0;
  list-style: none;
}
.rule-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.rule-list .badge {
  margin-right: 0.5rem;
}
.rule-list small {
  color: var(--muted);
  display: block;
  margin-left: 0.2rem;
}
details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.9rem;
}
summary {
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  font-weight: 650;
}
details > .details-body {
  padding: 0.2rem 1.2rem 1.3rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
th {
  color: #49636f;
  background: #edf4f6;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 750;
}
th,
td {
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td ul {
  padding-left: 1rem;
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
.empty {
  padding: 3rem 1.5rem;
  text-align: center;
  background: #fff;
  border: 1px dashed #adc6d0;
  border-radius: 12px;
}
.empty h2 {
  margin: 0.4rem 0;
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}
.empty p {
  max-width: 640px;
  margin: 0.8rem auto 1.2rem;
  color: var(--muted);
}
.empty-icon {
  margin: auto;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: #e3f3f3;
  color: var(--teal);
  font-size: 2rem;
}
.eye {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: auto;
}
.eye text {
  font:
    12px system-ui,
    sans-serif;
  fill: #405b68;
}
.eye .iris {
  fill: #e8f4f4;
  stroke: #82b7bc;
  stroke-width: 2;
}
.eye .pupil {
  fill: #315d67;
}
.eye .guide {
  stroke: #bdcfd7;
  stroke-dasharray: 4 4;
}
.eye .incision {
  stroke: #007d80;
  stroke-width: 5;
  stroke-linecap: round;
}
.eye .dot {
  fill: #007d80;
}
.eye .hypo {
  stroke: #d39932;
  stroke-width: 3;
}
.eye .axis {
  stroke: #568ab4;
  stroke-width: 2;
}
.brief {
  background: white;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 1120px;
  margin: auto;
}
.brief h2 {
  font-size: 1.5rem;
  margin: 0.2rem 0;
}
.brief h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}
.brief .brief-head {
  border-bottom: 2px solid var(--teal);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.brief .full-table td:first-child {
  width: 55%;
  color: #526b78;
}
.brief-footer {
  margin-top: 1.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.print-only {
  display: none;
}
footer {
  padding: 1rem 0;
  font-size: 0.77rem;
  color: var(--muted);
}
.link-button {
  border: 0;
  padding: 0.2rem;
  color: var(--teal);
  background: transparent;
}
.metric {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}
.file-input {
  border: 1px dashed #a7c2cf;
  padding: 1rem;
  border-radius: 8px;
}
.loading {
  margin: 3rem;
}
.error-text {
  color: #a33b3b;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 1rem 0;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split aside {
    max-width: 400px;
  }
  .statusbar {
    grid-template-columns: 1fr 1fr;
  }
  .statusbar .statusbox:first-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .workspace {
    padding: 1rem 0.8rem 3rem;
  }
  .top {
    padding: 1.1rem;
  }
  .version {
    float: none;
  }
  .top h1 {
    font-size: 1.5rem;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .statusbar {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    width: 100%;
  }
  .tabs button {
    padding: 0.7rem;
  }
  .card {
    padding: 1rem;
  }
  .brief {
    padding: 1rem;
  }
  .row button {
    flex-grow: 1;
  }
  .panel-title {
    display: block;
  }
}
