.tn-compound-page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  color: var(--tn-compound-ink, #1a1208);
  -webkit-text-fill-color: currentColor;
}

.tn-compound-page,
.tn-compound-page * {
  box-sizing: border-box;
}

.tn-compound-tool {
  --tn-compound-ink: #1a1208;
  --tn-compound-muted: #5a4a30;
  --tn-compound-line: #b8a888;
  --tn-compound-soft-line: #ddd4be;
  --tn-compound-paper: #faf6ee;
  --tn-compound-wash: #f5efdf;
  --tn-compound-button: #ede6d4;
  --tn-compound-button-hover: #dfd4bb;
  --tn-compound-accent: #c44a00;
  --tn-compound-primary: #1f1710;
  --tn-compound-primary-hover: #3a2a1b;
  margin: 0 auto 18px;
  border-top: 2px solid var(--tn-compound-ink);
  border-bottom: 1px solid var(--tn-compound-line);
  background: linear-gradient(180deg, var(--tn-compound-paper), var(--tn-compound-wash));
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
}

.tn-compound-tool ul,
.tn-compound-tool ol,
.tn-compound-tool li,
.tn-compound-tool dl,
.tn-compound-tool dd,
.tn-compound-tool p {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tn-compound-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
  min-height: 420px;
}

.tn-compound-input,
.tn-compound-result {
  min-width: 0;
  padding: 18px;
}

.tn-compound-input {
  border-right: 1px solid var(--tn-compound-line);
}

.tn-compound-pane-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--tn-compound-ink);
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tn-compound-fields,
.tn-compound-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tn-compound-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-width: 0;
  border: 1px solid var(--tn-compound-line);
  background: rgba(255, 252, 244, 0.74);
}

.tn-compound-field span {
  grid-column: 1 / -1;
  padding: 9px 10px 0;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-field span em {
  margin-left: 4px;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font-style: normal;
  font-weight: 500;
}

.tn-compound-field input,
.tn-compound-field select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
  font: 700 17px/42px Georgia, "Times New Roman", serif;
  outline: 0;
}

.tn-compound-field input {
  padding: 0 10px 8px;
}

.tn-compound-field select {
  padding: 0 30px 8px 10px;
  appearance: none;
}

.tn-compound-field b {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 10px;
  border-left: 1px solid var(--tn-compound-soft-line);
  border-bottom: 1px solid var(--tn-compound-soft-line);
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-period {
  grid-template-columns: minmax(0, 1fr) 82px;
}

.tn-compound-period input {
  border-right: 1px solid var(--tn-compound-soft-line);
}

.tn-compound-advanced {
  margin-top: 10px;
  border-top: 1px double var(--tn-compound-line);
  padding-top: 10px;
}

.tn-compound-advanced summary {
  cursor: pointer;
  margin-bottom: 10px;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.tn-compound-secondary,
.tn-compound-actions .tn-compound-secondary:first-child {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tn-compound-line);
  border-radius: 0;
  background: var(--tn-compound-button);
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
  cursor: pointer;
  font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  outline: 0;
}

.tn-compound-actions .tn-compound-secondary:first-child {
  border-color: var(--tn-compound-primary);
  background: var(--tn-compound-primary);
  color: #f7ead1;
  -webkit-text-fill-color: #f7ead1;
}


.tn-compound-actions .tn-compound-secondary:first-child:hover {
  background: var(--tn-compound-primary-hover);
}

.tn-compound-secondary:hover {
  background: var(--tn-compound-button-hover);
}

.tn-compound-secondary:focus-visible,
.tn-compound-actions .tn-compound-secondary:first-child:focus-visible,
.tn-compound-field input:focus-visible,
.tn-compound-field select:focus-visible,
.tn-compound-advanced summary:focus-visible {
  outline: 2px solid var(--tn-compound-accent);
  outline-offset: 2px;
}

.tn-compound-secondary:disabled,
.tn-compound-field input:disabled,
.tn-compound-field select:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.tn-compound-secondary:not(:focus-visible),
.tn-compound-actions .tn-compound-secondary:first-child:not(:focus-visible),
.tn-compound-secondary:hover,
.tn-compound-actions .tn-compound-secondary:first-child:hover,
.tn-compound-secondary:disabled,
.tn-compound-actions .tn-compound-secondary:first-child:disabled {
  outline: 0;
}

.tn-compound-field input[aria-invalid="true"],
.tn-compound-field select[aria-invalid="true"] {
  background: rgba(196, 74, 0, 0.08);
}


.tn-compound-status,
.tn-compound-disclaimer {
  margin-top: 10px;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-main {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 14px;
  row-gap: 8px;
  padding: 16px 0 14px;
  border-top: 1px solid var(--tn-compound-ink);
  border-bottom: 1px double var(--tn-compound-line);
}

.tn-compound-main span {
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 13px/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-main strong {
  min-width: 0;
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
  font: 700 clamp(28px, 4vw, 46px)/0.95 Georgia, "Times New Roman", serif;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.tn-compound-main em {
  grid-column: 1 / -1;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-style: normal;
}

.tn-compound-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--tn-compound-line);
}

.tn-compound-metrics div {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--tn-compound-soft-line);
}

.tn-compound-metrics div:last-child {
  border-right: 0;
}

.tn-compound-metrics dt {
  margin-bottom: 6px;
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-metrics dd {
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
  font: 700 16px/1.2 Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tn-compound-schedule {
  margin-top: 14px;
  overflow-x: auto;
}

.tn-compound-schedule table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
}

.tn-compound-schedule th,
.tn-compound-schedule td {
  border-bottom: 1px solid var(--tn-compound-soft-line);
  padding: 8px 7px;
  text-align: right;
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-compound-schedule th:first-child,
.tn-compound-schedule td:first-child {
  text-align: left;
}

.tn-compound-schedule th {
  color: var(--tn-compound-muted);
  -webkit-text-fill-color: var(--tn-compound-muted);
  font-weight: 700;
}

.tn-compound-page .tn-article-panel ul,
.tn-compound-page .tn-article-panel ol,
.tn-compound-page .tn-article-panel li,
.tn-compound-page .tn-design-note ul,
.tn-compound-page .tn-design-note li {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.tn-compound-page .tn-source-link {
  box-shadow: none;
}

.tn-example-ledger {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--tn-compound-soft-line, #ddd4be);
}

.tn-example-ledger div {
  display: grid;
  grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--tn-compound-soft-line, #ddd4be);
}

.tn-example-ledger dt {
  color: var(--tn-compound-muted, #5a4a30);
  -webkit-text-fill-color: var(--tn-compound-muted, #5a4a30);
  font: 700 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tn-example-ledger dd {
  margin: 0;
  color: var(--tn-compound-ink, #1a1208);
  -webkit-text-fill-color: var(--tn-compound-ink, #1a1208);
  font: 13px/1.45 Georgia, "Times New Roman", serif;
}

body[data-scheme="dark"] .tn-compound-tool,
body[data-scheme="inverse"] .tn-compound-tool,
body[data-scheme="auto"][data-l="dark"] .tn-compound-tool,
body[data-scheme="auto"][data-d="dark"] .tn-compound-tool,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-tool {
  --tn-compound-ink: #f7ead1;
  --tn-compound-muted: #d5c3a6;
  --tn-compound-line: #826744;
  --tn-compound-soft-line: #58432d;
  --tn-compound-paper: #21170f;
  --tn-compound-wash: #17100b;
  --tn-compound-button: #2f2115;
  --tn-compound-button-hover: #3a2a1b;
  --tn-compound-primary: #6a3b1f;
  --tn-compound-primary-hover: #824826;
  --tn-compound-accent: #e38b4f;
  background: linear-gradient(180deg, var(--tn-compound-paper), var(--tn-compound-wash));
  color: var(--tn-compound-ink);
  -webkit-text-fill-color: var(--tn-compound-ink);
}

body[data-scheme="dark"] .tn-compound-field,
body[data-scheme="inverse"] .tn-compound-field,
body[data-scheme="auto"][data-l="dark"] .tn-compound-field,
body[data-scheme="auto"][data-d="dark"] .tn-compound-field,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-field {
  background: #251a11;
}

body[data-scheme="dark"] .tn-compound-secondary,
body[data-scheme="inverse"] .tn-compound-secondary,
body[data-scheme="auto"][data-l="dark"] .tn-compound-secondary,
body[data-scheme="auto"][data-d="dark"] .tn-compound-secondary,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-secondary {
  background: #2f2115;
  color: #f7ead1;
  -webkit-text-fill-color: #f7ead1;
  border-color: #826744;
}

body[data-scheme="dark"] .tn-compound-secondary:hover,
body[data-scheme="inverse"] .tn-compound-secondary:hover,
body[data-scheme="auto"][data-l="dark"] .tn-compound-secondary:hover,
body[data-scheme="auto"][data-d="dark"] .tn-compound-secondary:hover,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-secondary:hover {
  background: #3a2a1b;
}

body[data-scheme="dark"] .tn-compound-actions .tn-compound-secondary:first-child,
body[data-scheme="inverse"] .tn-compound-actions .tn-compound-secondary:first-child,
body[data-scheme="auto"][data-l="dark"] .tn-compound-actions .tn-compound-secondary:first-child,
body[data-scheme="auto"][data-d="dark"] .tn-compound-actions .tn-compound-secondary:first-child,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-actions .tn-compound-secondary:first-child {
  background: #6a3b1f;
  color: #f7ead1;
  -webkit-text-fill-color: #f7ead1;
  border-color: #6a3b1f;
}

body[data-scheme="dark"] .tn-compound-actions .tn-compound-secondary:first-child:hover,
body[data-scheme="inverse"] .tn-compound-actions .tn-compound-secondary:first-child:hover,
body[data-scheme="auto"][data-l="dark"] .tn-compound-actions .tn-compound-secondary:first-child:hover,
body[data-scheme="auto"][data-d="dark"] .tn-compound-actions .tn-compound-secondary:first-child:hover,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-actions .tn-compound-secondary:first-child:hover {
  background: #824826;
}


@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-compound-tool,
  body:not([data-scheme]) .tn-compound-tool {
    --tn-compound-ink: #f7ead1;
    --tn-compound-muted: #d5c3a6;
    --tn-compound-line: #826744;
    --tn-compound-soft-line: #58432d;
    --tn-compound-paper: #21170f;
    --tn-compound-wash: #17100b;
    --tn-compound-button: #2f2115;
    --tn-compound-button-hover: #3a2a1b;
    --tn-compound-accent: #e38b4f;
  }

  body[data-scheme="auto"] .tn-compound-field,
  body:not([data-scheme]) .tn-compound-field {
    background: #251a11;
  }

  body[data-scheme="auto"] .tn-compound-secondary,
  body:not([data-scheme]) .tn-compound-secondary {
    background: #2f2115;
    color: #f7ead1;
    -webkit-text-fill-color: #f7ead1;
    border-color: #826744;
  }

  body[data-scheme="auto"] .tn-compound-actions .tn-compound-secondary:first-child,
  body:not([data-scheme]) .tn-compound-actions .tn-compound-secondary:first-child {
    background: #6a3b1f;
    color: #f7ead1;
    -webkit-text-fill-color: #f7ead1;
    border-color: #6a3b1f;
  }

  body[data-scheme="auto"] .tn-compound-actions .tn-compound-secondary:first-child:hover,
  body:not([data-scheme]) .tn-compound-actions .tn-compound-secondary:first-child:hover {
    background: #824826;
  }
}

@media (max-width: 720px) {
  .tn-compound-page {
    width: calc(100vw - 10px);
  }

  .tn-compound-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tn-compound-input {
    border-right: 0;
    border-bottom: 1px solid var(--tn-compound-line);
  }

  .tn-compound-input,
  .tn-compound-result {
    padding: 12px;
  }

  .tn-compound-fields,
  .tn-compound-advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tn-compound-field span {
    padding: 8px 8px 0;
    font-size: 11px;
  }

  .tn-compound-field input,
  .tn-compound-field select {
    height: 39px;
    font-size: 15px;
    line-height: 39px;
  }

  .tn-compound-field input {
    padding: 0 8px 7px;
  }

  .tn-compound-field b {
    min-width: 34px;
    padding: 0 7px;
  }

  .tn-compound-main {
    grid-template-columns: 1fr;
    align-items: start;
    column-gap: 0;
  }

  .tn-compound-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tn-compound-metrics div:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 370px) {
  .tn-compound-fields,
  .tn-compound-advanced-grid,
  .tn-compound-actions {
    grid-template-columns: 1fr;
  }

  .tn-compound-metrics {
    grid-template-columns: 1fr;
  }

  .tn-compound-metrics div {
    border-right: 0;
  }
}
body[data-scheme="dark"] .tn-compound-actions .tn-compound-primary:focus-visible,
body[data-scheme="inverse"] .tn-compound-actions .tn-compound-primary:focus-visible,
body[data-scheme="auto"][data-l="dark"] .tn-compound-actions .tn-compound-primary:focus-visible,
body[data-scheme="auto"][data-d="dark"] .tn-compound-actions .tn-compound-primary:focus-visible,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-actions .tn-compound-primary:focus-visible{background:#824826;border-color:#824826;color:#f7ead1;-webkit-text-fill-color:#f7ead1;}
body[data-scheme="dark"] .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible,
body[data-scheme="inverse"] .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible,
body[data-scheme="auto"][data-l="dark"] .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible,
body[data-scheme="auto"][data-d="dark"] .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible{background:#3a2a1b;border-color:#826744;color:#f7ead1;-webkit-text-fill-color:#f7ead1;}
@media (prefers-color-scheme:dark){body[data-scheme="auto"] .tn-compound-actions .tn-compound-primary:focus-visible{background:#824826;border-color:#824826;}body[data-scheme="auto"] .tn-compound-actions .tn-compound-secondary:not(.tn-compound-primary):focus-visible{background:#3a2a1b;border-color:#826744;}}
@media (max-width:370px){.tn-compound-fields,.tn-compound-advanced-grid,.tn-compound-actions,.tn-compound-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}}
