:root {
  color-scheme: light;
  --page: #f5f6ef;
  --paper: #fff;
  --ink: #17241e;
  --muted: #4e6055;
  --border: #dce4da;
  --pine: #173a2d;
  --green: #265d44;
  --lime: #d9efa5;
  --radius: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid #347850; outline-offset: 3px; }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.masthead { background: #fcfdf9; border-bottom: 1px solid var(--border); }
.masthead-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 750; font-size: 1.13rem; letter-spacing: -.025em; }
.brand img { display: block; border-radius: 9px; }
.header-link { color: var(--green); font-size: .9rem; font-weight: 700; text-decoration: none; }
.header-link:hover { text-decoration: underline; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 227px;
  display: flex;
  align-items: center;
  margin-block: 25px 27px;
  border-radius: 22px;
  background: radial-gradient(ellipse at 87% 35%, #295242 0%, transparent 58%), #18382c;
  color: #fcfff7;
}
.hero-copy { position: relative; z-index: 1; padding: 32px 38px 35px; max-width: 68%; }
.method { font-size: .88rem; font-weight: 700; color: var(--lime); letter-spacing: .045em; }
h1 { margin-top: 11px; font-size: clamp(2.4rem, 4.2vw, 3.75rem); line-height: 1.03; font-weight: 760; letter-spacing: -.06em; text-wrap: balance; }
.hero-copy > p:last-child { color: #dae6da; margin-top: 16px; max-width: 35rem; font-size: 1rem; line-height: 1.55; }
.blueprint { position: absolute; width: min(50%, 510px); height: 100%; inset: 0 0 0 auto; object-fit: cover; object-position: center; user-select: none; pointer-events: none; }

.workspace { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; gap: 25px; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); }
.inputs { padding: 22px 21px; }
.input-head { margin-bottom: 20px; }
h2 { font-size: 1.65rem; line-height: 1.1; font-weight: 750; letter-spacing: -.038em; }
.input-head p, .result-head p { font-size: .93rem; line-height: 1.45; color: var(--muted); margin-top: 6px; }
#measurements { scroll-margin-block: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 11px; }
.field { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.field label { font-size: .88rem; font-weight: 650; line-height: 1.25; flex: 1; }
#body-fields label { flex: 0 0 auto; }
.field-wide { grid-column: 1 / -1; }
.control { position: relative; }
.control input, .control select {
  display: block;
  width: 100%;
  min-height: 43px;
  padding: 7px 34px 7px 11px;
  color: var(--ink);
  background: #fbfcf9;
  border: 1px solid #d5e0d4;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}
.control input:hover, .control select:hover { border-color: #9ab19f; }
.control input[aria-invalid="true"] { border-color: #b45942; }
.control select { appearance: none; cursor: pointer; }
.unit, .select-arrow { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.unit { color: var(--muted); font-size: .8rem; }
.chevron, .select-arrow { width: 8px; height: 8px; border-right: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); transform: rotate(45deg); }
.select-arrow { right: 14px; transform: translateY(-70%) rotate(45deg); }
.field-error { color: #963c29; font-size: .81rem; line-height: 1.35; }
.field-hint, .parameter-hint { color: var(--muted); font-size: .81rem; line-height: 1.45; }
.parameter-hint { margin-bottom: 13px; }
.parameters { border-top: 1px solid var(--border); margin-top: 21px; padding-top: 17px; }
.parameters summary { display: flex; min-height: 31px; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.05rem; font-weight: 750; cursor: pointer; list-style: none; padding: 0 3px 4px 0; }
.parameters summary::-webkit-details-marker { display: none; }
.parameters[open] .chevron { transform: translateY(3px) rotate(225deg); }
.parameters[open] .parameter-hint { margin-top: 7px; }
.form-actions { padding-top: 19px; margin-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.button, .text-button { font-size: .88rem; font-weight: 700; line-height: 1.2; min-height: 40px; }
.button { display: inline-flex; gap: 9px; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid #d5e0d4; border-radius: 9px; }
.secondary { background: #fcfdf9; color: var(--pine); }
.secondary:not(:disabled):hover { background: #edf4e8; border-color: #acbfac; }
.button:disabled { opacity: .48; cursor: default; }
.text-button { border: 0; padding: 6px 1px; color: var(--green); background: transparent; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.results { min-width: 0; }
.result-head { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin: 2px 0 16px; }
.copy-button { flex: 0 0 auto; }
.copy-icon { width: 13px; height: 15px; position: relative; margin-inline: 1px 2px; border: 1.5px solid currentColor; border-radius: 2px; }
.copy-icon::after { content: ""; position: absolute; width: 8px; height: 11px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; border-radius: 2px; top: 4px; left: 5px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 0 0 16px; }
.metric { background: #e7eedf; border: 1px solid #dbe6d6; border-radius: 13px; padding: 14px 15px; min-width: 0; }
.metric:first-child { background: #dcebbf; border-color: #d4e5ac; }
.metric-label { color: #3a5546; font-weight: 680; font-size: .88rem; line-height: 1.3; }
.metric-number { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; color: var(--pine); margin-top: 6px; font-weight: 760; }
.metric-number > span:first-child { font-size: clamp(1.46rem, 2.8vw, 2.12rem); line-height: 1.05; letter-spacing: -.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-unit { font-size: .85rem; }
.empty { padding: 25px; }
.empty h3 { margin-bottom: 7px; }
.empty p { line-height: 1.5; color: var(--muted); }
.warnings { margin-bottom: 16px; border: 1px solid #edcd96; border-radius: 12px; background: #fff7e6; color: #674318; padding: 13px 15px; font-size: .9rem; line-height: 1.45; }
.warnings ul { margin: 5px 0 0; padding-left: 18px; }

.details-panel { padding: 0 20px 10px; }
.dimensions-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding-block: 17px 13px; }
h3 { font-size: 1.2rem; line-height: 1.2; font-weight: 750; letter-spacing: -.023em; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; position: relative; color: var(--green); font-size: .88rem; font-weight: 700; cursor: pointer; }
.switch-label input { position: absolute; opacity: 0; width: 36px; height: 22px; left: 0; margin: 0; cursor: pointer; }
.switch-track { display: block; width: 35px; height: 20px; background: #e5ebe3; border: 1px solid #becbbf; border-radius: 100px; }
.switch-track::after { content: ""; display: block; width: 12px; height: 12px; background: #63796d; border-radius: 100%; margin: 3px; }
.switch-label input:checked + .switch-track { background: var(--green); border-color: var(--green); }
.switch-label input:checked + .switch-track::after { background: white; margin-left: 18px; }
.switch-label input:focus-visible + .switch-track { outline: 2px solid #347850; outline-offset: 3px; }
.compare-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 15px; flex-wrap: wrap; padding: 5px 12px; background: #f2f6ef; border-radius: 8px; margin: 0 0 17px; }
#compare-status { flex: 1 1 230px; padding-block: 4px; font-size: .83rem; color: var(--muted); line-height: 1.35; }
.compare-bar button { min-height: 33px; }
.result-group { margin: 0 0 15px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
thead { background: #f1f5ee; color: #2f4d3e; }
thead th { padding: 8px 10px; text-align: left; font-size: .88rem; line-height: 1.24; font-weight: 730; }
thead th:first-child { border-radius: 7px 0 0 7px; }
thead th:last-child { border-radius: 0 7px 7px 0; }
.value-col { width: 5.3rem; text-align: right; }
.delta-col { width: 5.4rem; text-align: right; }
tbody th, tbody td { border-bottom: 1px solid #e8ede7; padding: 8px 10px; line-height: 1.34; }
tbody th { text-align: left; font-size: .925rem; font-weight: 500; overflow-wrap: anywhere; }
tbody td { font-weight: 730; font-size: .98rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
tbody tr:last-child > * { border-bottom: 0; }
.formula { display: none; margin-top: 3px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.show-formulas .formula { display: block; }
.delta-col { color: #2f6450; }
.delta-zero { color: #75867a; font-weight: 500; }

.checks { margin-top: 16px; padding: 18px 20px 5px; }
.checks dl { margin-block: 8px; }
.checks dl > div { padding: 10px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 6px 15px; flex-wrap: wrap; }
.checks dl > div + div { border-top: 1px solid #e8ede7; }
.checks dt { font-size: .93rem; }
.checks dd { margin: 0; color: var(--pine); font-weight: 720; font-variant-numeric: tabular-nums; }
.checks dd span { margin-left: 6px; font-weight: 500; color: var(--muted); font-size: .85rem; }
.notice { position: fixed; z-index: 2; right: max(16px, calc((100vw - 1200px) / 2)); bottom: 20px; max-width: calc(100vw - 32px); padding: 12px 17px; border-radius: 10px; background: var(--pine); color: white; box-shadow: 0 4px 20px #14281e2c; font-size: .9rem; pointer-events: none; }
.notice:empty { padding: 0; }

@media (max-width: 1020px) {
  .shell { width: calc(100% - 52px); }
  .workspace { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; }
  .inputs { padding-inline: 16px; }
  .details-panel { padding-inline: 14px; }
  .hero-copy { max-width: 70%; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .masthead-inner { min-height: 56px; }
  .hero { min-height: 188px; margin-block: 17px 19px; border-radius: 17px; }
  .hero-copy { max-width: 100%; padding: 26px 23px; }
  .hero-copy > p:last-child { margin-top: 12px; }
  .blueprint { opacity: .2; mask-image: linear-gradient(90deg, transparent, black 44%); }
  .workspace { grid-template-columns: 1fr; gap: 21px; }
  #model-fields { gap: 15px; }
  .result-head { margin-top: 0; }
  .metric { padding-inline: 11px; }
}
@media (max-width: 400px) {
  .shell { width: calc(100% - 26px); }
  .hero-copy { padding-inline: 17px; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.47rem; }
  .input-head p, .result-head p { font-size: .87rem; }
  .result-head { align-items: start; }
  .copy-button { padding-inline: 8px; }
  .metrics { gap: 6px; }
  .metric { padding: 10px 7px; }
  .metric-label { font-size: .82rem; }
  .details-panel { padding-inline: 10px; }
  .value-col, .delta-col { width: 4.1rem; }
  thead th, tbody th, tbody td { padding-inline: 6px; }
}
main.shell { padding-bottom: 32px; }
#result-heading { scroll-margin-block: 14px; }
.mobile-results { display: none; }
.delta-col small { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; font-weight: 500; }
@media (max-width: 760px) {
  .mobile-results { display: flex; justify-content: space-between; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 18px; padding: 9px 10px; min-height: 42px; border-radius: 8px; background: #e9f1dc; color: var(--pine); text-decoration: none; font-size: .87rem; }
  .mobile-results > span:last-child { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
}

.brand { text-decoration: none; }
.account-nav { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 17px; }
.account-user { min-width: 0; max-width: 23rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .88rem; }
.account-nav .header-link { flex: 0 0 auto; }
.entry-hero { min-height: 306px; }
.hero-copy .entry-description { max-width: 35rem; margin-top: 16px; color: #dae6da; line-height: 1.55; }
.entry-action { margin-top: 22px; }
.primary { display: inline-flex; background: var(--lime); color: var(--pine); text-decoration: none; border-color: #b6d086; }
.primary:hover { background: #e8f4c8; }
.button[href] { text-decoration: none; }
.entry-privacy, .info-page { max-width: 740px; padding: 22px; }
.entry-privacy h2 { font-size: 1.15rem; }
.entry-privacy p, .info-page p { margin-top: 7px; color: var(--muted); line-height: 1.55; }
.info-page { margin-top: 26px; }
.info-page h1, .admin-heading h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.info-page .button { margin-top: 18px; }
.admin-page { margin-top: 27px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-heading p, .admin-empty { color: var(--muted); margin-top: 8px; line-height: 1.5; }
.admin-panel { padding: 20px; }
.admin-panel h2 { font-size: 1.25rem; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; }
.visitor-table { min-width: 625px; }
.visitor-table th:first-child { width: 23%; }
.visitor-table th:nth-child(2) { width: 32%; }
.visitor-table tbody td { font-size: .9rem; font-weight: 500; }
.pagination { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 15px; color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) {
  .entry-hero { min-height: 235px; }
  .hero-copy .entry-description { margin-top: 12px; }
  .account-nav { gap: 11px; }
  .account-user { display: none; }
  .entry-privacy, .info-page, .admin-panel { padding: 17px; }
}
.consent-form { margin-top: 16px; }

.entry-action { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-secondary { color: #f2f8eb; background: transparent; border-color: #9eb4a3; }
.entry-secondary:hover { background: #315746; }
.email-auth-page { max-width: 470px; margin: 30px auto 0; padding: 26px; }
.email-auth-page h1 { font-size: clamp(2rem, 4vw, 2.65rem); margin: 0; }
.auth-description, .auth-footer { color: var(--muted); line-height: 1.5; margin-top: 9px; }
.auth-form { display: grid; gap: 13px; margin-top: 20px; }
.auth-form .field { font-size: .9rem; font-weight: 650; }
.auth-form input {
  width: 100%; min-height: 44px; padding: 8px 11px; color: var(--ink);
  background: #fbfcf9; border: 1px solid #d5e0d4; border-radius: 8px; font-weight: 400;
}
.auth-form .button { justify-self: start; }
.auth-form .field-hint { margin-top: -6px; }
.auth-footer { margin-top: 19px; font-size: .9rem; }
.auth-footer a { color: var(--green); font-weight: 700; }
.auth-footer a:last-child { display: block; width: fit-content; margin-top: 5px; }
.auth-error { padding: 9px 11px; background: #fff1e9; color: #913922; border-radius: 8px; margin-top: 13px; line-height: 1.45; }
.signout-button { padding: 0; border: 0; background: none; }
.visitor-email-status { display: block; margin-top: 3px; color: var(--muted); font-size: .81rem; font-weight: 400; }
@media (max-width: 400px) {
  .email-auth-page { padding: 18px; }
}

.auth-success { padding: 9px 11px; background: #e9f1dc; color: var(--pine); border-radius: 8px; margin-top: 13px; line-height: 1.45; }
.mail-status { margin: -4px 0 15px; color: var(--muted); font-size: .88rem; line-height: 1.45; }

.admin-tabs, .admin-delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 15px; }
.admin-tabs [aria-current="page"] { background: #e7f0db; border-color: #b6cba8; }
.admin-result { margin-bottom: 15px; }
.moderation-table { min-width: 860px; }
.moderation-table th:first-child { width: 18%; }
.moderation-table th:nth-child(2) { width: 27%; }
.moderation-table th:last-child { width: 168px; }
.blocked-table { min-width: 685px; }
.blocked-table th:nth-child(2) { width: 34%; }
.admin-actions { display: grid; justify-items: start; }
.admin-actions .text-button { padding: 5px 0; min-height: 31px; font-size: .82rem; }
.danger-text { color: #983d2c; }
.admin-delete-form { margin-top: 18px; margin-bottom: 0; }
.admin-delete-form .button { margin-top: 0; }
.danger-button { background: #9c3d2c; color: white; border-color: #9c3d2c; }
.danger-button:hover { background: #823021; }
.account-cell-label { display: none; }
@media (max-width: 860px) {
  .moderation-table { display: block; min-width: 0; }
  .moderation-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .moderation-table tbody, .moderation-table tr, .moderation-table tbody td, .moderation-table tbody th { display: block; }
  .moderation-table tbody tr { padding: 11px 0; border-top: 1px solid var(--border); }
  .moderation-table tbody td, .moderation-table tbody th { padding: 3px 4px; border: 0; width: auto; }
  .moderation-table tbody th { font-weight: 720; }
  .account-cell-label { display: inline-block; margin-right: 7px; color: var(--muted); font-weight: 500; }
  .moderation-table .admin-actions { display: flex; flex-wrap: wrap; gap: 5px 14px; padding-top: 3px; }
  .admin-actions .text-button { font-size: .88rem; }
}

.templates { margin: -4px 0 17px; border: 1px solid var(--border); border-radius: 9px; background: #f7faf4; }
.templates summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 43px;
  padding: 8px 13px; color: var(--pine); cursor: pointer; list-style: none; font-size: .92rem; font-weight: 720;
}
.templates summary::-webkit-details-marker { display: none; }
.templates[open] .chevron { transform: translateY(3px) rotate(225deg); }
.templates-body { padding: 0 12px 12px; }
.templates-body label { display: block; margin: 3px 0 6px; font-size: .87rem; font-weight: 650; }
.templates .control input { padding-right: 11px; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 6px; }
.template-form { border-top: 1px solid var(--border); margin-top: 9px; padding-top: 9px; }
.template-form button { margin-top: 8px; }
.template-status { color: var(--green); margin-top: 8px; overflow-wrap: anywhere; font-size: .86rem; line-height: 1.4; }
.template-status:empty { display: none; }
.template-error { color: #983d2c; }
.template-confirmation { margin-top: 6px; padding: 8px; background: #fff3ef; border-radius: 8px; overflow-wrap: anywhere; font-size: .88rem; }
.templates button:disabled { opacity: .48; cursor: default; }
