/* Tinketti – mobiili edellä */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --text: #1c2421;
  --muted: #5b6863;
  --border: #d5ddd9;
  --primary: #2f6f5e;
  --primary-text: #ffffff;
  --primary-hover: #245849;
  --error: #b42318;
  --error-bg: #fdecea;
  --ok-bg: #e7f4ee;
  --info-bg: #eaf1fb;
  --radius: 10px;
  --tap: 48px;
  --group-bg: #eef5f2;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121715;
    --surface: #1b2220;
    --text: #e6ece9;
    --muted: #9aa8a2;
    --border: #2e3935;
    --primary: #5fb39a;
    --primary-text: #0d1311;
    --primary-hover: #77c4ad;
    --error: #ff8a80;
    --error-bg: #3a1f1d;
    --ok-bg: #18322a;
    --info-bg: #1b2a3a;
    --group-bg: #17201d;
  }
}

* { box-sizing: border-box; }
/* hidden-attribuutti voittaa aina komponenttien display-säännöt */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }

.topbar {
  position: sticky; top: 0; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem;
  padding: .5rem 1rem;
  background: var(--primary); color: var(--primary-text);
}
.brand { color: inherit; font-weight: 700; font-size: 1.15rem; text-decoration: none; padding: .5rem 0; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.nav a, .linkbutton {
  color: inherit; text-decoration: none; font: inherit; font-size: .95rem;
  background: none; border: 0; padding: .5rem 0; cursor: pointer;
}
.nav a:hover, .linkbutton:hover { text-decoration: underline; }
.nav form { margin: 0; }

.page { max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem;
}
.narrow { max-width: 26rem; margin-left: auto; margin-right: auto; }
.muted, .hint, .meta { color: var(--muted); }
.hint { font-size: .9rem; margin: .25rem 0 0; }

.form { display: flex; flex-direction: column; }
.form label { font-weight: 600; margin: .9rem 0 .3rem; }
.form label.check { font-weight: 400; display: flex; align-items: center; gap: .6rem; min-height: var(--tap); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], select {
  width: 100%; min-height: var(--tap); padding: .6rem .75rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
input[type=checkbox] { width: 1.3rem; height: 1.3rem; accent-color: var(--primary); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 2px;
}
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; margin: .3rem 0 0; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.row > div { display: flex; flex-direction: column; }
@media (min-width: 30rem) { .row { grid-template-columns: 8rem 1fr; } }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: .6rem 1.25rem; margin-top: 1.25rem;
  font: inherit; font-weight: 600; text-decoration: none;
  color: var(--primary-text); background: var(--primary);
  border: 0; border-radius: 8px; cursor: pointer;
}
.button:hover { background: var(--primary-hover); }
.button-secondary { color: var(--primary); background: transparent; border: 1px solid var(--primary); }
.button-secondary:hover { background: var(--ok-bg); }
.button-danger { color: var(--error); background: transparent; border: 1px solid var(--error); }
.button-danger:hover { background: var(--error-bg); }
.form .button { width: 100%; }
@media (min-width: 30rem) { .form .button { width: auto; align-self: flex-start; } }

.notice { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; }
.notice-ok { background: var(--ok-bg); }
.notice-info { background: var(--info-bg); }
.notice-error { background: var(--error-bg); color: var(--error); }

.heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.heading-row h1 { margin: 0; }
.heading-row .button { margin: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { margin-bottom: .5rem; }
.list a {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .85rem 1rem; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.list a:hover { border-color: var(--primary); }
.list span { overflow-wrap: anywhere; }
.list .meta { font-size: .9rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.tile {
  display: flex; flex-direction: column; justify-content: center; min-height: 6rem;
  padding: 1rem; font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
a.tile:hover { border-color: var(--primary); }
.tile small { font-weight: 400; color: var(--muted); }
.tile-soon { opacity: .6; }

/* Ajopäiväkirja */
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
.row-even { grid-template-columns: 1fr; }
@media (min-width: 30rem) { .row-even { grid-template-columns: 1fr 1fr; } }
input[type=time], input[type=number] {
  width: 100%; min-height: var(--tap); padding: .6rem .75rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.tile-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.tile-primary small { color: inherit; opacity: .85; }
a.tile-primary:hover { background: var(--primary-hover); }

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.inline-form select { width: auto; flex: 1 1 12rem; }
.inline-form label { font-weight: 600; }

.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .5rem 0 1rem; }
.month-nav a {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  font-size: 1.6rem; text-decoration: none; border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
}
.month-nav strong { font-size: 1.15rem; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.summary div {
  display: flex; flex-direction: column; align-items: center; padding: .75rem .5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.summary span { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary small { color: var(--muted); }

.trips { list-style: none; margin: 0; padding: 0; }
.trip {
  display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; margin-bottom: .5rem; padding: .75rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.trip-main { display: flex; flex-direction: column; gap: .1rem; color: var(--text); text-decoration: none; min-width: 0; }
.trip-date { font-size: .9rem; color: var(--muted); }
.trip-route { font-weight: 600; overflow-wrap: anywhere; }
.trip .meta { font-size: .9rem; }
.trip-km { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-km small { display: block; font-weight: 400; color: var(--muted); }
.trip-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: center; }
.trip-actions a, .trip-actions .linkbutton { font-size: .95rem; padding: .35rem 0; }
.trip-actions form { margin: 0; }
.trip-invalid { border-style: dashed; opacity: .75; }
.linkbutton { color: var(--primary); text-decoration: underline; }
.topbar .linkbutton { color: inherit; text-decoration: none; }
.linkbutton.danger { color: var(--error); }

.ac { position: relative; }
.ac-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: .25rem 0;
  list-style: none; max-height: 16rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.ac-list li { padding: .65rem .75rem; cursor: pointer; overflow-wrap: anywhere; }
.ac-list li:hover, .ac-list li[aria-selected=true] { background: var(--ok-bg); }
.locate { align-self: flex-start; margin-top: .35rem; font-size: .95rem; }

.km-row { display: flex; gap: .5rem; align-items: stretch; }
.km-row input { flex: 1 1 auto; min-width: 0; }
.km-row .button { margin: 0; white-space: nowrap; }

.quick h2 { margin-bottom: .5rem; }
.quick-label { font-weight: 600; margin: .75rem 0 .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem; text-decoration: none;
  border: 1px solid var(--primary); border-radius: 999px; color: var(--primary);
}
.chip:hover { background: var(--ok-bg); }
.recent { list-style: none; margin: 0; padding: 0; }
.recent a {
  display: block; padding: .6rem 0; color: var(--text); text-decoration: none; border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.recent li:first-child a { border-top: 0; }
.recent small { display: block; color: var(--muted); }

.actions-card { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.actions-card .button, .actions-card form { margin: 0; }
.report-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-links .button { margin: 0; }

/* Hallinta */
.edit-row h2 { margin: 0; }
.edit-row.archived { opacity: .65; }
.edit-row .button, form.card .button { margin-top: .75rem; }
.edit-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.edit-grid > div { display: flex; flex-direction: column; }
@media (min-width: 30rem) {
  .edit-grid { grid-template-columns: 1fr 7rem; }
  .edit-grid-3 { grid-template-columns: 7rem 1fr 1fr; }
}
form.card label:not(.check) { display: block; font-weight: 600; margin: .75rem 0 .3rem; }
form.card .check { display: flex; align-items: center; gap: .6rem; min-height: 40px; }

.list-row { display: flex; align-items: center; gap: .75rem; }
.list-row > a { flex: 1 1 auto; min-width: 0; }
.list-row form { margin: 0; }

.edit-row > form + form { margin-top: .25rem; }
@media (min-width: 30rem) { .edit-grid-even { grid-template-columns: 1fr 1fr; } }
.past-rates { margin-top: 1rem; }
.past-rates summary { cursor: pointer; color: var(--primary); padding: .5rem 0; min-height: var(--tap); display: flex; align-items: center; }
.past-rates table { border-collapse: collapse; width: 100%; max-width: 26rem; font-variant-numeric: tabular-nums; }
.past-rates th, .past-rates td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
.logo-preview { display: block; max-width: 220px; max-height: 80px; margin: .25rem 0 .5rem; background: #fff; padding: .4rem; border: 1px solid var(--border); border-radius: 8px; }
input[type=file] { font: inherit; padding: .4rem 0; }

/* Päivärahat */
fieldset.group {
  min-width: 0; margin: 1.25rem 0 0; padding: .9rem 1rem 1rem;
  background: var(--group-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 10px;
}
/* float pitää otsikon kehyksen sisällä (ei reunaviivan päällä) */
fieldset.group legend { float: left; width: 100%; padding: 0; margin: 0 0 .25rem; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
fieldset.group legend + * { clear: both; }
fieldset.group label:first-of-type { margin-top: .25rem; }
.segments { display: flex; gap: .5rem; margin-top: .9rem; }
.segment {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 400 !important; margin: 0 !important;
}
.segment:has(input:checked) { border-color: var(--primary); background: var(--ok-bg); font-weight: 600 !important; }
.segment input { accent-color: var(--primary); }
.calc { margin-top: 1.25rem; padding: .85rem 1rem; border-radius: 8px; background: var(--info-bg); font-weight: 600; }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.rate-grid > div { display: flex; flex-direction: column; }
@media (min-width: 40rem) { .rate-grid { grid-template-columns: repeat(3, 1fr); } }
.table-scroll { overflow-x: auto; }
.past-rates table { max-width: none; min-width: 26rem; }

/* Valikko: leveällä näytöllä linkit palkissa, kapealla hampurilaisvalikko */
.menu-toggle { display: none; }
@media (max-width: 48rem) {
  .topbar { flex-wrap: wrap; gap: 0; padding: 0 0 0 1rem; }
  .brand { padding: .75rem 0; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); padding: 0 1rem;
    font: inherit; font-weight: 600; color: inherit; background: none; border: 0; cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
    transition: transform .15s ease, background .15s ease;
  }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  [data-menu-open] .menu-icon { background: transparent; }
  [data-menu-open] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  [data-menu-open] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .nav {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    margin-left: -1rem; padding: .25rem 0 .5rem; border-top: 1px solid rgba(255,255,255,.2);
  }
  [data-menu-open] .nav, .no-js .nav { display: flex; }
  .no-js .menu-toggle { display: none; }
  .nav a, .nav .linkbutton {
    display: flex; align-items: center; min-height: var(--tap); padding: 0 1rem; font-size: 1.05rem; width: 100%; text-align: left;
  }
  .nav a[aria-current=page] { background: rgba(255,255,255,.12); font-weight: 600; }
}
.summary span { white-space: nowrap; font-size: clamp(1rem, 4.6vw, 1.2rem); }
.summary small { text-align: center; }

/* iOS: päivämäärä- ja kellonaikakentillä on oma vähimmäisleveys, joka venyttää ne yli reunan. */
input[type=date], input[type=time] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 1.5; height: var(--tap);
}
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; }
.row > div, .row-even > div { min-width: 0; }
.segment { background: var(--surface); }

/* Työaika */
.week-dates { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); text-align: center; }
.month-nav strong { text-align: center; }
.neg { color: var(--error); }
.bank-line { margin: -.25rem 0 1rem; }
.notice-warn { background: #fff4e5; color: #7a4a00; }
@media (prefers-color-scheme: dark) { .notice-warn { background: #3a2a12; color: #ffcf8a; } }
.days { list-style: none; margin: 0 0 1rem; padding: 0; }
.day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .5rem; }
.day-off { background: transparent; }
.day-holiday { margin-left: .4rem; font-weight: 400; font-size: .85em; color: var(--primary); }
.day-today { border-color: var(--primary); }
.day-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.day-sum { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.entries { list-style: none; margin: .5rem 0 0; padding: 0; }
.entry a, .entry > span { display: flex; flex-wrap: wrap; gap: .1rem .6rem; padding: .45rem .6rem; color: var(--text); text-decoration: none; border-radius: 6px; }
.entry a:hover { background: var(--ok-bg); }
.entry { border-left: 3px solid var(--primary); margin-bottom: .25rem; background: var(--group-bg); border-radius: 6px; }
.entry-absence { border-left-color: #8a6bbf; }
.entry-bank_leave { border-left-color: #c08a2b; }
.entry-overtime { border-left-color: var(--error); }
.entry-code { font-weight: 600; }
.entry-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.entry-note { flex-basis: 100%; font-size: .9rem; color: var(--muted); }
.entry a { display: flex; flex-wrap: wrap; }
.day-add { display: inline-flex; align-items: center; min-height: 40px; margin-top: .35rem; font-size: .95rem; }
.day-warning { font-size: .9rem; color: #7a4a00; margin: .4rem 0 0; }
@media (prefers-color-scheme: dark) { .day-warning { color: #ffcf8a; } }
.submit-card p { margin-top: 0; }
.return-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1 1 16rem; }
.return-form input { flex: 1 1 10rem; width: auto; }
.return-form .button { margin: 0; }
.trip-overdue { border-color: var(--error); }
.overtime-note { margin: .5rem 0 0; }
.banner { display: block; padding: .75rem 1rem; background: #fff4e5; color: #7a4a00; text-align: center; text-decoration: none; font-weight: 600; }
@media (prefers-color-scheme: dark) { .banner { background: #3a2a12; color: #ffcf8a; } }
.kind-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.kind-list li { margin-bottom: .25rem; }
.weekday-picker { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.weekday-picker legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.weekday-picker .segment { gap: .2rem; padding: 0 .1rem; font-size: .9rem; flex-direction: column; min-height: 56px; }
.list-plain { display: flex; flex-direction: column; gap: .1rem; flex: 1 1 auto; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
input[type=month] { width: 100%; min-height: var(--tap); padding: .6rem .75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; -webkit-appearance: none; appearance: none; min-width: 0; }

/* Tinketti: yrityksen logo, yritysvalinta, demo ja ylläpito */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-logo { height: 28px; width: auto; max-width: 120px; background: #fff; border-radius: 4px; padding: 2px; }
.list-row > .list-form { flex: 1 1 auto; min-width: 0; }
.list-button {
  display: flex; flex-direction: column; gap: .1rem; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
}
.list-button:hover { border-color: var(--primary); }
.banner a { color: inherit; }
.banner-demo { background: var(--info-bg); color: var(--text); font-weight: 400; }
@media (prefers-color-scheme: dark) { .banner-demo { background: var(--info-bg); color: var(--text); } }
.color-row { display: flex; align-items: center; gap: 1rem; }
.color-row input[type=color] { width: 4rem; height: var(--tap); padding: .2rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.page-wide { max-width: 64rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; }
.data-table tfoot td { font-weight: 700; }
.badge { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 99px; background: var(--group-bg); border: 1px solid var(--border); white-space: nowrap; }
.badge-trial { background: var(--info-bg); }
.badge-active { background: var(--ok-bg); }
.badge-suspended, .badge-closed { background: var(--error-bg); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.stats span { display: block; font-size: 1.4rem; font-weight: 700; }
.stats small { color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }

/* Demon aloitussivu */
.demo-hero { text-align: center; padding: 1.5rem 0 .5rem; }
.demo-hero h1 { font-size: 1.9rem; }
.demo-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.demo-choices .card { display: flex; flex-direction: column; }
.demo-choices form { margin-top: auto; }
.demo-choices ul { padding-left: 1.2rem; margin: .25rem 0 1rem; }
.subnav { margin: 0 0 1.25rem; font-size: .95rem; }
.subnav a[aria-current] { font-weight: 700; text-decoration: none; color: var(--text); }
.report-links form { margin: 0; }
textarea { width: 100%; padding: .6rem .75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }

/* Esittelysivu (kirjautumattoman etusivu, myöhemmin tinketti.fi) – mobiili edellä */
.site { background: var(--surface); }
.site-header {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(8px);
}
.site-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; min-height: var(--tap); }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--primary); }
.site-nav { gap: .5rem; }
.site-nav a:not(.site-pill) { display: none; }
.site-nav a[aria-current] { color: var(--primary); font-weight: 700; }
.site-pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border: 1px solid var(--primary); border-radius: 99px; color: var(--primary) !important; font-weight: 600; white-space: nowrap; }
.site-pill-primary { background: var(--primary); color: var(--primary-text) !important; }
.site-flash { max-width: 68rem; margin: 1rem auto 0; }
.site main { overflow-x: clip; }

.hero { display: grid; gap: 2.5rem; max-width: 68rem; margin: 0 auto; padding: 2.5rem 1rem 3rem; align-items: center; }
.eyebrow { margin: 0 0 .75rem; color: var(--primary); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: clamp(1.9rem, 6.5vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; text-wrap: balance; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 .5rem; max-width: 34rem; }
.hero-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.25rem; }
.hero-actions form, .try-card form { margin: 0; }
.hero-actions .button, .try-card .button { width: 100%; margin: 0; }
.hero-note { color: var(--muted); font-size: .9rem; margin: 1rem 0 0; }

.phone { justify-self: center; width: min(17rem, 80vw); padding: .6rem; border-radius: 2.2rem; background: #1c2421; box-shadow: 0 30px 60px -20px rgb(28 36 33 / .45); }
.phone-screen { height: 100%; border-radius: 1.7rem; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; font-size: .8rem; }
.phone-bar { background: var(--primary); color: var(--primary-text); font-weight: 700; padding: 1.4rem 1rem .7rem; }
.phone-body { padding: .8rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.phone-title { font-weight: 700; font-size: .95rem; margin: 0 0 .2rem; }
.phone-row, .phone-total, .phone-week { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .65rem; background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; }
.phone-row small { display: block; color: var(--muted); font-size: .72rem; }
.phone-total { background: var(--group-bg); font-size: .75rem; }
.phone-badge { background: var(--ok-bg); color: var(--primary); font-weight: 700; padding: .1rem .5rem; border-radius: 99px; font-size: .7rem; }
.phone-button { margin-top: auto; margin-bottom: .4rem; text-align: center; background: var(--primary); color: var(--primary-text); font-weight: 700; padding: .7rem; border-radius: .6rem; }

.site-section { max-width: 68rem; margin: 0 auto; padding: 3rem 1rem; }
.site-section h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 1.5rem; text-wrap: balance; }
.site-section h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.section-lead { color: var(--muted); max-width: 40rem; margin: -.75rem 0 1.5rem; }
.features { display: grid; gap: 1rem; }
.feature { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.feature p, .points p { margin: 0; color: var(--muted); }
.feature-icon { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .75rem; border-radius: .7rem; background: var(--ok-bg); font-size: 1.3rem; }
.site-band { max-width: none; background: var(--group-bg); }
.points { display: grid; gap: 1.5rem; max-width: 68rem; margin: 0 auto; }
.try { display: grid; gap: 1rem; }
.try-card { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.try-card ul { padding-left: 1.2rem; margin: .5rem 0 1.5rem; color: var(--muted); }
.try-card li { margin-bottom: .3rem; }
.try-card form { margin-top: auto; }
.try-role { margin: 0 0 .3rem; color: var(--primary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.site-footer { padding: 1.25rem 1rem 1.5rem; color: var(--muted); border-top: 1px solid var(--border); font-size: .95rem; }
.site-footer-inner { display: grid; gap: .75rem; max-width: 68rem; margin: 0 auto; text-align: center; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
.site-footer nav a { min-height: 32px; display: inline-flex; align-items: center; }

/* Hinnasto, yhteystiedot ja tilauslomake */
.prices { display: grid; gap: 1rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.price-card-featured { border: 2px solid var(--primary); }
.price-card h3 { color: var(--muted); font-size: 1rem; font-weight: 600; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: .25rem 0 0; line-height: 1.1; }
.price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-vat { color: var(--muted); font-size: .85rem; margin: .25rem 0 1rem; }
.price-card ul { padding-left: 1.2rem; margin: 0 0 1.5rem; color: var(--muted); }
.price-card .button { margin-top: auto; width: 100%; }
.site-narrow { max-width: 44rem; }
.site-title { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.02em; }
.contact-grid { display: grid; gap: 1rem; }
.contact-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.contact-card p { margin: .2rem 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.contact-actions .button { margin: 0; }
.order-form fieldset.group { background: var(--bg); }
.order-form textarea { margin-bottom: .25rem; }
.price-estimate { margin: .6rem 0 0; font-size: 1.05rem; }
.label-like { font-weight: 600; margin: 1.1rem 0 .3rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 40rem) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.site-pill) { display: inline; }
  .prices { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-inner { grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  .site-footer nav { justify-content: flex-end; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .button { width: auto; }
  .features, .try { grid-template-columns: repeat(2, 1fr); }
  .points { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: 1.3fr 1fr; padding: 4.5rem 1.5rem 4rem; }
  .phone { aspect-ratio: 9 / 18; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .site-section { padding: 4rem 1.5rem; }
}
.center-text { text-align: center; }
.site-section[id] { scroll-margin-top: 4rem; }
.badge-order-pending { background: var(--info-bg); font-weight: 700; }
.badge-order-approved { background: var(--ok-bg); }
.badge-order-rejected { background: var(--error-bg); }
.details { display: grid; grid-template-columns: 1fr; gap: .1rem 1rem; margin: 1rem 0; }
.details dt { font-weight: 600; color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 36rem) { .details { grid-template-columns: 12rem 1fr; } .details dt { margin-top: 0; } }
.contact-card h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; letter-spacing: 0; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .35rem; }
.legal-table { font-size: .9rem; margin: .5rem 0 1rem; }
@media (max-width: 40rem) {
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--border); }
  .legal-table td { display: block; border: 0; padding: .1rem 0; }
  .legal-table td:first-child { font-weight: 600; }
}
.terms-check { align-items: flex-start !important; margin-top: 1.25rem !important; }
.terms-check input { margin-top: .3rem; }
.terms-check input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }

/* Käyttöohjeet (/ohjeet) */
.help-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.help-toc ul { margin: .5rem 0 0; }
.help-toc li { margin-bottom: .2rem; }

/* Julkiset laskurit (/laskurit) */
.calc-sum { font-size: 1.8rem; margin: 0 0 .25rem; }
.calc p { margin: .2rem 0; }
.calc-note { font-weight: 400; font-size: .9rem; }
.calc-links { margin-bottom: 2rem; }
@media (min-width: 40rem) { .calc-links { grid-template-columns: 1fr 1fr; } }
.calc-links .tile { text-decoration: none; color: inherit; }
.calc-links h2 { font-size: 1.15rem; margin: 0 0 .4rem; color: var(--primary); }
.site-narrow > h2 { font-size: 1.4rem; margin: 2.5rem 0 .75rem; }
.calc-cta { margin-top: 2.5rem; }
.calc-cta h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
