#methodology { flex: 1; overflow: auto; }
#methodology[hidden] { display: none; }

.methods { color: var(--color-label); font-family: var(--font-text); }
.is-weights { background: #0a84ff; }
.is-cache { background: #bf5af2; }
.is-ssd { background: #ff9f0a; }
.rules-popover {
  position: fixed;
  z-index: 1000;
  min-width: 240px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-menu);
  color: var(--color-label);
  background: var(--color-menu);
  box-shadow: var(--shadow-menu);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
.rules-row { display: flex; align-items: center; gap: 16px; height: 24px; padding: 0 10px; border-radius: 5px; font-size: 13px; cursor: default; }
.rules-row .popover-detail { color: var(--color-label-secondary); }
.rules-popover .popover-heading { padding: 5px 10px 3px; }

.rules-button { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--color-label); }
.rules-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rules-button { background: none; box-shadow: none; }
.rules-button:hover,
.rules-button[aria-expanded="true"] { background: var(--color-fill); }
@media (max-width: 899px) { .rules-button { height: 34px; padding: 0 8px; border-radius: 999px; font-size: 15px; } }

.platform-bar .filter-button,
.filter-bar .filter-button { background: var(--color-fill); border-radius: var(--radius-control); }
.platform-bar .filter-button:hover,
.filter-bar .filter-button:hover,
.platform-bar .filter-button[aria-expanded="true"],
.filter-bar .filter-button[aria-expanded="true"] { background: var(--color-fill-secondary); }

@media (max-width: 899px) {
  .rules-popover { padding: 6px; border-radius: 14px; }
  .rules-popover .popover-heading { padding: 8px 12px 4px; font-size: 13px; }
  .rules-row {
    gap: 8px;
    height: auto;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 16px;
  }
  .rules-row .popover-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rules-row .popover-detail {
    flex: none;
    margin-left: auto;
    padding-left: 16px;
    font-size: 16px;
    line-height: normal;
    text-align: right;
    white-space: nowrap;
    color: var(--color-label-secondary);
  }
}

.limit-bar { position: sticky; top: 0; z-index: 5; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.limit-bar::-webkit-scrollbar { display: none; }
.limit-bar > *, .limit-sub > * { flex: none; }
.limit-sub { display: inline-flex; gap: inherit; }
.limit-sub[hidden], .limit-toggle[hidden] { display: none; }

.limit-bar select.limit-select {
  padding-right: 24px;
  border: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2 5l3-3 3 3M2 9l3 3 3-3' fill='none' stroke='%238e8e93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 8px 12px;
  color: var(--color-label);
  font: inherit;
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.limit-toggle { display: inline-flex; align-items: center; gap: 0; cursor: pointer; white-space: nowrap; }
.limit-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.limit-toggle:has(input:checked) { background: var(--color-accent-tint); color: var(--color-accent); }
.limit-toggle:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@media (max-width: 899px) {
  .limit-bar select.limit-select { padding-right: 27px; background-position: right 12px center; background-size: 8px 12px; font-size: 15px; }
}

@media (max-width: 899px) {
  .limit-bar select.limit-select,
  .limit-bar .limit-toggle { height: 34px; border-radius: 999px; }
  .limit-bar .limit-toggle { padding: 0 14px; font-size: 15px; }
  .limit-bar { gap: 8px; }
}

@media (max-width: 899px) {
  .limit-bar .limit-pick { height: 34px; padding: 0 12px 0 14px; border-radius: 999px; font-size: 15px; }
}

.filter-bar > .rules-button,
.platform-bar > .rules-button { order: 99; flex: none; margin-left: auto; }
.platform-bar > .platform-bar-side.is-end { margin-left: auto; }
.platform-bar:has(> .platform-bar-side.is-end) > .rules-button { margin-left: 0; }

.lim-tables { display: flex; flex-direction: column; gap: 24px; padding-bottom: 48px; }
.lim-table { width: 100%; font-size: 13px; }
.lim-table .lim-fill { width: 100%; padding: 0; }
.lim-table .lim-term { color: var(--color-label-secondary); }
.lim-table .lim-how { max-width: 560px; overflow: hidden; text-overflow: ellipsis; color: var(--color-label-secondary); }
.lim-table td.lim-formula { padding-top: 0; padding-bottom: 0; white-space: nowrap; }
:is(.lim-table, .m-doc) .m-eq { display: inline-block; vertical-align: middle; font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; color: var(--color-label); }
:is(.lim-table, .m-doc) .m-var { white-space: nowrap; }
:is(.lim-table, .m-doc) .m-var { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 12px; font-weight: 500; line-height: 18px; color: color-mix(in srgb, var(--pill, var(--color-accent)) 75%, var(--color-label)); background: color-mix(in srgb, var(--pill, var(--color-accent)) 18%, transparent); }
:is(.lim-table, .m-doc) .m-tag { display: inline-flex; align-items: center; gap: 7px; }
:is(.lim-table, .m-doc) .m-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--pill); }
:is(.lim-table, .m-doc) .m-var sub { font-style: normal; font-size: .68em; vertical-align: -.3em; line-height: 0; margin-left: .05em; }
:is(.lim-table, .m-doc) .m-eq sup { font-size: .68em; vertical-align: .55em; line-height: 0; }
:is(.lim-table, .m-doc) .m-op { margin: 0 .3em; }
:is(.lim-table, .m-doc) .m-comma { margin-right: .35em; }
:is(.lim-table, .m-doc) .m-fn { font-style: normal; }
:is(.lim-table, .m-doc) .m-paren { margin: 0 .15em; color: var(--color-label-secondary); }
.lim-table .lim-source .cite { margin-right: 4px; }
.lim-table a { color: var(--color-label); text-decoration: none; }
.lim-table a:hover { color: var(--color-accent); }
.lim-table .lim-source { color: var(--color-label-secondary); text-align: right; white-space: nowrap; }
.lim-table .lim-source .cite { cursor: pointer; margin: 0; font-size: inherit; font-weight: inherit; text-decoration: none; color: inherit; }
.lim-table .lim-source .cite:hover { color: var(--color-accent); }
.lim-table thead th:hover { color: var(--color-label-secondary); }
.rules-button:focus:not(:focus-visible) { outline: none; box-shadow: none; }

@media (max-width: 899px) {
  .rules-label { display: none; }
  .rules-button { width: 34px; padding: 0; justify-content: center; }
  .rules-button svg { width: 20px; height: 20px; }
  .lim-tables { overflow-x: auto; overscroll-behavior-x: contain; }
}

.spec-field {
  display: inline-flex; align-items: center; height: var(--control-height); padding: 0 4px 0 9px;
  border-radius: var(--radius-control); background: var(--color-fill); color: var(--color-label); white-space: nowrap; font-size: 13px;
}
.spec-field:hover { background: var(--color-fill-secondary); }
.spec-field:focus-within { box-shadow: 0 0 0 3px var(--color-accent-tint), 0 0 0 1px var(--color-accent); }
.spec-field-label { margin-right: 6px; color: var(--color-label-secondary); }
.spec-field input {
  width: 2.1ch; padding: 0; border: 0; outline: none; background: none; color: inherit; font: inherit;
  font-variant-numeric: tabular-nums; text-align: right; caret-color: var(--color-accent); -webkit-appearance: none; appearance: none;
}
.spec-unit { margin-right: 2px; }
.platform-bar .spec-field { border-radius: var(--radius-control); }

.spec-stepper { display: inline-flex; flex-direction: column; align-self: stretch; justify-content: center; width: 18px; }
.spec-stepper button {
  display: grid; flex: 0 0 50%; place-items: center; padding: 0; border: 0; background: none; border-radius: 4px;
  color: var(--color-label-secondary); cursor: default;
}
.spec-stepper button:first-child { place-items: end center; padding-bottom: 1px; }
.spec-stepper button:last-child { place-items: start center; padding-top: 1px; }
.spec-stepper button:hover { color: var(--color-label); }
.spec-stepper button:active { color: var(--color-accent); }
.spec-stepper svg { width: 8px; height: 5px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 899px) {
  .spec-field { height: 34px; padding: 0 8px 0 14px; border-radius: 999px; font-size: 15px; }
  .spec-stepper { width: 24px; }
}
.spec-stepper { height: 28px; }
.spec-stepper { width: 20px; }

.rules-label { display: none; }
.rules-button { width: var(--control-height); height: var(--control-height); padding: 0; justify-content: center; border-radius: var(--radius-control); }
.rules-button svg { width: 16px; height: 16px; }
@media (max-width: 899px) { .rules-button { width: 34px; height: 34px; border-radius: 999px; } .rules-button svg { width: 20px; height: 20px; } }
.lim-table { counter-reset: lim-row; }
.lim-table td.row-number::before { counter-increment: lim-row; content: counter(lim-row); }

.m-doc > * + * { margin-top: 14px; }
.m-doc h3 { margin-top: 28px; font: 600 15px/1.3 var(--font-display); color: var(--color-label); }
.approach-main .board-section-head > .board-title-pick { align-self: center; height: 28px; padding: 0 8px 0 10px; border-radius: 8px; font-size: 13px; background: var(--color-fill); }
.approach-main .board-section-head > .board-title-pick .mode-icon { margin-left: 0; }
.method-article .method-pane-body .m-doc > p { max-width: 720px; font-size: 14px; line-height: 1.6; }
.method-article .method-pane-body .m-doc > h3 ~ p { max-width: 60%; }
.m-doc-eqs { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.m-doc-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 16px; border-radius: 10px; background: var(--color-fill); }
.m-doc-eq-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.m-doc-eq-line > .op { color: var(--color-label-secondary); }
.m-doc .m-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--color-label); }
.m-doc .m-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--pill); }
.m-doc .m-eq { min-width: 0; font-size: 13px; line-height: 26px; font-variant-numeric: tabular-nums; color: var(--color-label); white-space: normal; }
.m-doc .m-eq .m-var, .m-doc .m-eq .m-tag { white-space: nowrap; }
.m-doc-cite { margin-left: auto; font-size: 12px; color: var(--color-label-secondary); white-space: nowrap; }
.m-doc .cite { color: var(--color-label-secondary); text-decoration: none; cursor: pointer; }
.m-doc .cite:hover { color: var(--color-accent); }
.m-doc-terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin-top: 10px; font-size: 14px; line-height: 1.5; }
.m-doc-terms dt { margin: 0; }
.m-doc-terms dd { margin: 0; color: var(--color-label-secondary); }
.m-doc-list { margin-top: 8px; padding-left: 20px; list-style: none; color: var(--color-label-secondary); }
.m-doc-list li { position: relative; }
.m-doc-list li::before { content: ""; position: absolute; left: -16px; top: calc(.75em - 2.5px); width: 5px; height: 5px; border-radius: 1.5px; background: var(--color-label-tertiary); }
.m-doc-list li + li { margin-top: 6px; }
@media (max-width: 760px) { .m-doc-terms { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .m-doc-terms dd { margin-bottom: 8px; } .m-doc-eq { flex-direction: column; align-items: flex-start; gap: 6px; } .m-doc-cite { margin-left: 0; } }
