#meritve {
  background: #edf0e6;
  color: var(--lab-deep);
}

#meritve .experiment {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(2rem, 4.5vw, 3.75rem);
  border-top: 1px solid #b9c5b6;
}

#meritve .lead + .experiment { margin-top: clamp(1.75rem, 4vw, 3.5rem); }
#meritve .experiment:last-child { padding-bottom: 0; }
#meritve .experiment h3 {
  margin: 0 0 .8rem;
  font-size: clamp(1.6rem, 2.65vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  text-wrap: balance;
}

#meritve .experiment-copy > p {
  max-width: 65ch;
  margin: .9rem 0 0;
  color: var(--lab-muted);
  line-height: 1.63;
}

#meritve .experiment-copy strong { color: var(--lab-deep); }
#meritve .experiment-result {
  min-width: 0;
  padding: clamp(1.1rem, 2.65vw, 2rem);
  border-radius: 1rem;
  background: var(--lab-green);
  color: #fffdf4;
  font-variant-numeric: tabular-nums;
}

#meritve .experiment-result > p {
  margin: .95rem 0 0;
  color: #d3dfd3;
  font-size: .92rem;
  line-height: 1.53;
}

#meritve .experiment-result .source-link {
  color: #f4dab0;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: .23em;
}

#meritve .experiment-result .source-link:focus-visible,
#izracun :is(input, select):focus-visible {
  outline: 3px solid #f0b67a;
  outline-offset: 3px;
}

#meritve .lab-test-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  color: inherit;
}

#meritve .lab-test-table caption {
  text-align: left;
  padding-bottom: 1.05rem;
  color: #fffdf4;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 650;
  line-height: 1.24;
}

#meritve .lab-test-table :is(th, td) {
  min-width: 0;
  background: transparent;
  padding: .68rem 0 .68rem .65rem;
  border: 0;
  border-bottom: 1px solid #526a5c;
  text-align: right;
  vertical-align: middle;
}

#meritve .lab-test-table :is(th, td):first-child { padding-left: 0; text-align: left; }
#meritve .damage-figure {margin:clamp(1.5rem,3vw,2.8rem) 0 clamp(2rem,4vw,4rem);border:1px solid #c5cebf;border-radius:10px;overflow:hidden;background:#f8f9f1}
#meritve .damage-figure img {width:100%;height:auto;aspect-ratio:4.6;object-fit:cover}
#meritve .damage-figure figcaption {display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
#meritve .damage-figure figcaption span {padding:clamp(.45rem,1.3vw,1rem);font-size:clamp(.73rem,1.2vw,.94rem);line-height:1.45;color:#43554a}
#meritve .damage-figure figcaption span+span {border-left:1px solid #d4d9cb}
#meritve .damage-figure figcaption strong {display:block;font-size:1.02em;color:var(--lab-deep);margin-bottom:.1rem}
@media (max-width:680px) {#meritve .damage-figure img {aspect-ratio:3}}
#meritve .lab-test-table thead th {
  color: #cad8cb;
  padding-block: 0 .5rem;
  font-size: .85rem;
  font-weight: 500;
}

#meritve .lab-test-table tbody th { color: #fffdf4; font-weight: 580; line-height: 1.32; }
#meritve .lab-test-table tbody td { color: #fae5be; font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
#meritve .hardness-table td { width: 48%; }
#meritve .hardness-table th small { display: block; margin-top: .13rem; color: #cad8cb; font-size: .79rem; font-weight: 400; }
#meritve .hardness-table meter {
  appearance: none;
  display: block;
  width: 100%;
  height: .36rem;
  margin: .27rem 0 .12rem;
  border: 0;
  border-radius: .2rem;
  background: #51695c;
  color: #e5c38d;
}

#meritve .hardness-table meter::-webkit-meter-bar { background: #51695c; border: 0; border-radius: .2rem; }
#meritve .hardness-table meter::-webkit-meter-optimum-value { background: #e5c38d; border-radius: .2rem; }
#meritve .hardness-table meter::-moz-meter-bar { background: #e5c38d; border-radius: .2rem; }

#meritve .method-note {
  margin-top: 1.3rem;
  padding: .75rem 1rem;
  border: 1px solid #b9c5b6;
  border-radius: .65rem;
}

#meritve .method-note summary { color: var(--lab-green); font-weight: 650; line-height: 1.45; cursor: pointer; }
#meritve .method-note summary::marker { color: var(--lab-orange); }
#meritve .method-note summary:focus-visible { outline: 2px solid var(--lab-orange); outline-offset: 3px; }
#meritve .method-note p { margin: .75rem 0 0; color: var(--lab-muted); line-height: 1.55; }

#izracun {
  background: var(--lab-deep);
  color: var(--lab-paper);
}

#izracun h2 { color: var(--lab-paper); }
#izracun .eyebrow { color: #f0c18f; }
#izracun .lead, #izracun .calc-note { color: #d3dfd4; }
#izracun [hidden] { display: none !important; }
#izracun .calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(1.25rem, 4vw, 3.75rem);
  margin-top: clamp(1.8rem, 3.9vw, 3rem);
  align-items: start;
}

#izracun .calc-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem .9rem;
  margin: 0;
}

#izracun .calc-field {
  display: grid;
  gap: .45rem;
  align-content: start;
  color: #f4f5eb;
  font-weight: 600;
}

#izracun .calc-field:first-child,
#izracun .calc-error { grid-column: 1 / -1; }
#izracun .calc-field :is(select, input) {
  width: 100%;
  max-width: 100%;
  min-height: 3rem;
  padding: .55rem .78rem;
  box-sizing: border-box;
  border: 1px solid #91a698;
  border-radius: .45rem;
  color: #172d23;
  background-color: #f6f7ef;
  font: inherit;
  font-size: 1rem;
}

#izracun .calc-field select { cursor: pointer; }
#izracun .calc-field [aria-invalid="true"] { border-color: #ffaf95; box-shadow: inset 0 0 0 1px #a7432a; }
#izracun .calc-error { margin: 0; color: #ffd3c2; }
#izracun .calc-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  background: #e5e9d9;
  border-radius: .95rem;
  overflow: hidden;
  color: var(--lab-deep);
}

#izracun .calc-metric {
  min-width: 0;
  padding: clamp(1.05rem, 2.2vw, 1.8rem);
}

#izracun .calc-metric > * { display: block; }
#izracun .calc-metric span { color: #304b3b; font-weight: 650; line-height: 1.35; }
#izracun .calc-metric strong {
  margin: .6rem 0;
  font-size: clamp(1.6rem, 2.6vw, 2.65rem);
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

#izracun .calc-metric small { color: #36503e; font-size: .91rem; line-height: 1.45; }
#izracun .calc-buy { background: #f5d6a7; }
#izracun .calc-buy :is(span, small) { color: #533d24; }
#izracun .calc-buy strong { color: #342515; }
#izracun .calc-example {
  padding: 1.15rem 1.35rem;
  border-radius: .75rem;
  color: #26382c;
  background: #f2ddbb;
  line-height: 1.55;
}

#izracun .calc-note { max-width: 82ch; margin: 1.2rem 0 0; font-size: .91rem; line-height: 1.55; }

@media (max-width: 56rem) {
  #meritve .experiment, #izracun .calc-layout { grid-template-columns: minmax(0, 1fr); }
  #meritve .experiment { gap: 1.35rem; }
  #meritve .experiment-copy > p { max-width: none; }
}

@media (max-width: 30rem) {
  #meritve .lab-test-table :is(th, td) { padding-left: .45rem; }
  #izracun .calc-output, #izracun .calc-controls { grid-template-columns: minmax(0, 1fr); }
  #izracun .calc-metric strong { font-size: 2rem; }
}
