:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #142b43;
  background: #f2f5f8;
  font-size: 16px;
  font-synthesis: none;
  --ink: #142b43;
  --muted: #607084;
  --line: #dce4ec;
  --accent: #087f82;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cad6e0;
  border-radius: 7px;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #edf4f6;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
button.primary:hover {
  background: #244865;
}
button.quiet {
  border-color: transparent;
  background: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #35b7c3;
  outline-offset: 3px;
}
header {
  height: 80px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  gap: 26px;
  background: #10263f;
  color: white;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  white-space: nowrap;
}
.brand b {
  color: #6cdbd6;
  font-weight: 500;
}
.mark {
  display: grid;
  place-items: center;
  border: 1px solid #436277;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #6cdbd6;
}
.header-note {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: #9ab0c7;
  border-left: 1px solid #426079;
  padding-left: 26px;
}
.privacy {
  margin-left: auto;
  font-size: 0.8125rem;
  color: #c2d3e1;
}
main {
  max-width: 1640px;
  margin: auto;
  padding: 36px 4% 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 650;
  color: var(--accent);
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 10px 0;
}
p {
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0;
}
h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 650;
}
.page-heading p {
  font-size: 1rem;
}
.workspace {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 12px #18344e03;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 22px 22px 18px;
}
.badge {
  font-size: 0.75rem;
  padding: 5px 9px;
  background: #edf5f5;
  color: #2e6469;
  border-radius: 5px;
  white-space: nowrap;
}
.tabs {
  display: flex;
  margin: 0 20px 18px;
  background: #f0f3f6;
  padding: 4px;
  border-radius: 8px;
  gap: 3px;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  white-space: nowrap;
  padding: 9px 5px;
}
.tabs button[aria-selected="true"] {
  background: white;
  box-shadow: 0 2px 4px #142b4312;
  color: var(--accent);
}
#mode-content {
  padding: 0 20px 22px;
}
.help {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
.notice {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #85590c;
  background: #fff8e9;
  border: 1px solid #f0e2bb;
  border-radius: 7px;
  padding: 10px 12px;
  margin: 14px 0;
}
.material-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  margin: 12px 0;
  background: #fff;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}
.card-top input[type="text"] {
  min-width: 0;
  font-weight: 650;
  border-color: transparent;
  padding: 5px;
  flex: 1;
}
.card-top input[type="color"] {
  width: 25px;
  height: 28px;
  border: none;
  padding: 0;
  background: none;
  flex: none;
}
.icon-button {
  padding: 4px 5px;
  border: none;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.875rem;
  color: #44596b;
}
input,
select {
  border: 1px solid #cad5df;
  border-radius: 6px;
  background: white;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.875rem;
  min-width: 0;
}
input[type="checkbox"] {
  width: 16px;
  accent-color: var(--accent);
}
input[aria-invalid="true"] {
  border-color: #bf3e38;
  background: #fff8f7;
}
.card-result {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  color: #597385;
  margin-top: 11px;
  line-height: 1.6;
}
.error {
  color: #b2342f;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-top: 8px;
}
.full {
  width: 100%;
  margin-top: 10px;
}
.plot-heading {
  padding: 24px 26px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.plot-heading h2 {
  margin-top: 9px;
  font-size: 1.05rem;
}
.plot-container {
  padding: 8px 16px 0;
  overflow: auto;
}
.plot-container svg {
  display: block;
  width: 100%;
  min-width: 460px;
  height: auto;
  max-height: 600px;
}
.plot-footer {
  border-top: 1px solid #ecf0f4;
  margin: 0 24px;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
}
.legend-line {
  display: inline-block;
  width: 16px;
  border-top: 3px solid #416480;
  vertical-align: middle;
  margin-right: 5px;
}
.legend-fill {
  display: inline-block;
  width: 13px;
  height: 13px;
  background: #e8f1f6;
  vertical-align: middle;
  margin: 0 5px 0 14px;
}
.plot-column {
  display: grid;
  gap: 18px;
}
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  gap: 12px;
}
.export-bar strong {
  font-size: 0.875rem;
}
.export-bar span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
}
.export-buttons {
  display: flex;
  gap: 6px;
}
.settings {
  padding-bottom: 22px;
}
#settings {
  padding: 0 22px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}
.check-row label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}
.muted {
  font-size: 0.8125rem;
  color: var(--muted);
}
.data-panel {
  margin-top: 24px;
  overflow: hidden;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  white-space: nowrap;
}
th {
  text-align: left;
  background: #f8fafc;
  font-weight: 500;
  color: #607487;
  font-size: 0.75rem;
}
th,
td {
  padding: 13px 22px;
  border-top: 1px solid #e6ecf2;
}
td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}
.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 2px;
}
footer {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.75rem;
}
a {
  color: var(--accent);
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #142b43;
  color: white;
  border-radius: 8px;
  box-shadow: 0 6px 30px #0002;
  display: none;
  max-width: 90%;
  z-index: 10;
}
#toast.show {
  display: block;
}
.dft-fields {
  display: grid;
  gap: 13px;
}
.formula {
  background: #edf6f6;
  padding: 13px;
  border-radius: 7px;
  font:
    0.8125rem/1.7 ui-monospace,
    monospace;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.computed {
  background: #f1f7fa;
  padding: 13px;
  border-radius: 7px;
  margin: 16px 0;
}
.computed strong {
  display: block;
  font:
    1.1rem ui-monospace,
    monospace;
  margin: 7px 0;
}
details {
  margin-top: 15px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}
summary {
  cursor: pointer;
  color: #38566e;
}
#plot-warning:not(:empty) {
  margin: 0 24px 14px;
  font-size: 0.8125rem;
  color: #995714;
}
.mode-select {
  margin: 12px 0;
}
.small-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.small-row select {
  width: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: 390px minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .export-bar {
    flex-wrap: wrap;
  }
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid label:first-child {
    grid-column: 1/-1;
  }
  .header-note {
    display: none;
  }
}
@media (max-width: 760px) {
  header {
    height: 66px;
    padding: 0 20px;
  }
  .privacy {
    font-size: 0.75rem;
  }
  .brand {
    font-size: 1rem;
  }
  main {
    padding: 26px 16px 0;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  h1 {
    font-size: 1.8rem;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .plot-column {
    min-width: 0;
  }
  .plot-container svg {
    min-width: 420px;
  }
  .plot-heading {
    padding: 20px 16px 8px;
  }
  .plot-heading h2 {
    font-size: 0.9rem;
  }
  .plot-footer {
    flex-wrap: wrap;
  }
  .export-bar {
    padding: 18px 16px;
  }
  .export-buttons {
    flex-wrap: wrap;
  }
  footer {
    flex-direction: column;
  }
  .data-panel {
    margin-top: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
:root .empty-plot {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  background: #fafcfd;
}
.workspace > *,
.plot-column > *,
.settings-grid > * {
  min-width: 0;
}
.publication-top {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.publication-top > label {
  flex: 1;
}
.size-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.size-presets > span {
  width: 100%;
}
.size-presets button {
  font-size: 0.8125rem;
}
.publication-controls {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}
.publication-controls > summary {
  font-weight: 600;
}
.publication-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.publication-grid label:first-child {
  grid-column: auto;
}
.publication-grid input[type="color"] {
  height: 37px;
  padding: 4px;
}
.plot-container svg {
  max-height: 720px;
}
@media (max-width: 1000px) {
  .publication-top {
    flex-direction: column;
    align-items: stretch;
  }
  .publication-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 440px) {
  .publication-grid {
    grid-template-columns: 1fr 1fr;
  }
  .publication-grid label {
    font-size: 0.8125rem;
  }
  .size-presets button {
    flex: 1;
  }
}
