/* /nimi/ (J284 name check, draft 29.11.2026). Built on style.css (dark theme, three colours, header, footer).
   Only --p, --t and --k: tints are color-mix of the same three. --k only on "Tarkista nimi" (the one filled button).
   The result reads like a register extract: hairlines, business IDs in tabular figures, no green/red, no "ok" mood. */

.nm-tool { padding: clamp(14px, 4vw, 56px) 0 clamp(36px, 6vw, 72px); }
.nm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(28px, 6vw, 96px); align-items: start; }
.nm-main h1 { font-size: clamp(1.7rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em; max-width: 14ch; }
.nm-sub { margin-top: 12px; color: var(--graphite); font-size: var(--step-1); line-height: 1.4; max-width: 40ch; }

/* form: visible label, 52 px field and button (Y1, Y15) */
.nm-form { position: relative; margin-top: clamp(18px, 3vw, 32px); }
.nm-label { display: block; font-weight: 600; font-size: .95rem; color: var(--graphite); margin-bottom: 8px; }
.nm-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.nm-row input { font: inherit; font-size: 1.15rem; color: var(--ink); background: var(--paper); border: 1px solid color-mix(in srgb, var(--t) 34%, var(--p)); border-radius: 6px; padding: 0 16px; min-height: 52px; width: 100%; caret-color: var(--k); touch-action: manipulation; }
.nm-row input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.nm-row input[aria-invalid="true"] { border-color: var(--ink); border-width: 2px; }
.nm-go { min-height: 52px; padding: 0 26px; touch-action: manipulation; transition: background-color .18s ease, transform .12s ease; }
.nm-go:active { transform: scale(.97); }
.nm-go:disabled { cursor: progress; background: color-mix(in srgb, var(--k) 70%, var(--p)); border-color: transparent; }
.nm-forms { margin-top: 8px; min-height: 1.4em; font-size: .9rem; color: var(--graphite); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nm-forms.is-err { color: var(--ink); font-weight: 600; }

/* loading: a thin ink line under the field, no spinner; reduced motion keeps it still */
.nm-bar { position: absolute; left: 0; right: 0; top: calc(100% + 3px); height: 2px; overflow: hidden; opacity: 0; transition: opacity .15s ease; }
.nm-bar::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.nm-form.is-busy .nm-bar { opacity: 1; }
.nm-form.is-busy .nm-bar::before { animation: nm-fill 4s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes nm-fill { to { transform: scaleX(.92); } }

/* result */
.nm-result { margin-top: 18px; }
.nm-result:empty { margin-top: 0; }
.nm-result[aria-busy="true"] { opacity: .55; transition: opacity .15s ease; }
.nm-block { padding: 14px 0; border-top: 1px solid var(--rule); }
.nm-block-h { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--graphite); margin-bottom: 6px; }
.nm-ico { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.nm-ico.is-found { background: var(--ink); }
.nm-line { font-size: 1.02rem; line-height: 1.45; overflow-wrap: anywhere; }
.nm-list { list-style: none; margin: 8px 0 0; padding: 0; }
.nm-list li { display: grid; gap: 1px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--t) 9%, var(--p)); }
.nm-list li:last-child { border-bottom: 0; }
.nm-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.nm-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1px solid var(--ink); border-radius: 4px; font-size: .74rem; font-weight: 700; vertical-align: 2px; }
.nm-meta { font-size: .86rem; color: var(--graphite); line-height: 1.35; }
.nm-num { font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; }
.nm-small { margin-top: 8px; font-size: .86rem; color: var(--graphite); }
.nm-fi { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 1.02rem; line-height: 1.45; overflow-wrap: anywhere; }
.nm-limits { max-width: none; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .9rem; color: var(--graphite); line-height: 1.5; }
.nm-source { margin-top: 10px; font-size: .84rem; color: var(--graphite); font-variant-numeric: tabular-nums; }
.nm-result a, .nm-side a, .nm-who a { color: var(--ink); text-underline-offset: .22em; }
.nm-limits a, .nm-line a, .nm-fi a, .nm-small a, .nm-src a { display: inline-block; padding-block: 11px; margin-block: -11px; }

.nm-offer-result { margin-top: 18px; padding: 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); display: grid; gap: 12px; }
.nm-offer-result p { line-height: 1.45; }
.nm-logo { justify-self: start; min-height: 48px; gap: 10px; text-align: left; transition: background-color .18s ease, transform .12s ease; touch-action: manipulation; max-width: 100%; }
.nm-logo:active { transform: scale(.97); }
.nm-logo svg { flex: none; rotate: -45deg; transition: rotate 300ms cubic-bezier(.23, 1, .32, 1); }
.nm-logo:focus-visible svg { rotate: 0deg; }
@media (hover: hover) and (pointer: fine) { .nm-logo:hover svg { rotate: 0deg; } }

/* side column: PRH guidance (N6) and the short offer */
.nm-side { border-top: 2px solid var(--ink); padding-top: 18px; }
.nm-h { font-size: 1.3rem; letter-spacing: -.015em; }
.nm-rules { margin: 12px 0 0; padding-left: 1.1em; display: grid; gap: 10px; color: var(--graphite); line-height: 1.45; }
.nm-rules li::marker { color: var(--ink); }
.nm-src { margin-top: 12px; font-size: .84rem; color: var(--graphite); line-height: 1.45; }
.nm-offer-side { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.nm-offer-side p { margin-top: 10px; color: var(--graphite); line-height: 1.45; }
.nm-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.nm-navlink { color: var(--ink) !important; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.top nav a { min-height: 44px; display: inline-flex; align-items: center; }

.nm-next { padding: clamp(8px, 2vw, 24px) 0 clamp(32px, 5vw, 56px); }
.nm-steps { max-width: 64ch; gap: 12px; }
.nm-steps b { color: var(--ink); }
.nm-who { padding: clamp(32px, 5vw, 56px) 0; }
.nm-who p { margin-top: 10px; color: var(--graphite); line-height: 1.5; }
footer a { display: inline-block; padding-block: 11px; margin-block: -11px; }

main a:focus-visible, footer a:focus-visible, .top a:focus-visible, .nm-form button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.btn:active { transform: scale(.97); }
main[data-tila="paattyi"] [data-offer] { display: none; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .nm-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .top .wrap { min-height: 60px; }
  .nm-main h1 { font-size: 1.75rem; max-width: none; }
  .nm-sub { font-size: 1rem; margin-top: 8px; }
  .nm-row { grid-template-columns: 1fr; gap: 8px; }
  .nm-go { width: 100%; }
  .nm-block { padding: 11px 0; }
  .nm-list li { padding: 5px 0; }
  .nm-logo { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-form.is-busy .nm-bar::before { animation: none; transform: none; }
  .nm-go, .nm-logo, .nm-logo svg, .nm-bar, .nm-result[aria-busy="true"] { transition: none; }
  .nm-go:active, .nm-logo:active, .btn:active { transform: none; }
}
