:root {
  --bg: #fbf5ea;
  --paper: #fffdf8;
  --ink: #1e2a4a;
  --muted: #5b6479;
  --line: #eadfca;
  --green: #1f6b5c;
  --green-soft: #e2f0ea;
  --sun: #f2b63d;
  --sun-soft: #fdf0d2;
  --coral: #c8553d;
  --coral-soft: #fbe5df;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 42, 74, .06), 0 6px 24px rgba(30, 42, 74, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

/* Antraštė */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; line-height: 1.1; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; font-weight: 600; color: var(--green); font-size: 13px; }
.nav { display: flex; gap: 4px 18px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--sun); }
@media (max-width: 720px) {
  .top { position: static; }
  .top .wrap { padding: 10px 0; }
  .nav { margin-left: 0; width: 100%; gap: 4px 14px; }
}

/* Herojus */
section.hero { padding: 0; }
.hero { position: relative; overflow: hidden; background: #f6ead6 url(/hero.jpg) right center / cover no-repeat; }
.hero .wrap { min-height: 480px; display: flex; align-items: center; padding: 48px 0; }
.hero-card {
  max-width: 520px; background: rgba(255, 253, 248, .92); border-radius: 22px; padding: 32px;
  box-shadow: var(--shadow); backdrop-filter: blur(2px);
}
.hero-card .kicker { color: var(--green); font-weight: 700; margin-bottom: 8px; }
.hero-card p.lead { font-size: 19px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.pills li { background: var(--sun-soft); border: 1px solid #f0d79c; border-radius: 99px; padding: 3px 12px; font-size: 14px; font-weight: 600; }
@media (max-width: 720px) {
  .hero { background-image: none; }
  .hero::before { content: ""; display: block; aspect-ratio: 1344 / 752; background: url(/hero-800.jpg) center / cover; }
  .hero .wrap { min-height: 0; padding: 0 0 28px; margin-top: -40px; }
  .hero-card { padding: 22px; }
}

/* Mygtukai */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 12px; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #2d3d68; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
.btn.green { background: var(--green); border-color: var(--green); }
.btn.green:hover { background: #18594c; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 15px; }
.btn.danger { background: var(--coral); border-color: var(--coral); }

/* Sekcijos */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.alt .card { background: var(--bg); }
.card .num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--sun); color: var(--ink); margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.split { display: grid; gap: 32px; grid-template-columns: 1.1fr 1fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.check { list-style: none; padding: 0; margin: 0 0 1em; }
.check li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 9px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.note { background: var(--sun-soft); border: 1px solid #f0d79c; border-radius: 12px; padding: 14px 18px; }
.note.green { background: var(--green-soft); border-color: #bcdccf; }
.note.red { background: var(--coral-soft); border-color: #efc2b7; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Užduotis */
.task { background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; padding: 26px; box-shadow: 6px 6px 0 var(--sun); }
.task .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag { display: inline-block; background: var(--green-soft); color: var(--green); border-radius: 99px; padding: 2px 10px; font-size: 14px; font-weight: 700; }
.tag.sun { background: var(--sun-soft); color: #8a5a00; }
.task ol { padding-left: 22px; }
.level { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; }

/* Korepetitoriai */
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.tutors { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tutor { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.tutor h3 { margin: 0; }
.tutor .subj { display: flex; flex-wrap: wrap; gap: 6px; }
.tutor .facts { color: var(--muted); font-size: 15px; }
.tutor .price { font-weight: 800; font-size: 18px; }
.tutor .about { font-size: 15px; }
.tutor .btn { margin-top: auto; align-self: flex-start; }
.empty { text-align: center; padding: 40px 20px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Formos */
form.stack { display: grid; gap: 16px; }
label { font-weight: 600; display: block; }
label .hint, .hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #d8ccb4; border-radius: 10px; padding: 10px 12px; margin-top: 4px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(242, 182, 61, .45); border-color: var(--sun); }
fieldset { border: 1.5px solid #d8ccb4; border-radius: 12px; padding: 12px 16px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin-top: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.choice input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--green); }
.row2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.errors { background: var(--coral-soft); border: 1px solid #efc2b7; border-radius: 12px; padding: 12px 18px; }
.errors ul { margin: 6px 0 0; padding-left: 20px; }

/* Taisyklės */
.rules { counter-reset: r; list-style: none; padding: 0; display: grid; gap: 12px; }
.rules li { counter-increment: r; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 64px; position: relative; }
.rules li::before { content: counter(r); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; }
.rules strong { display: block; }

/* Administravimas */
table.adm { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
table.adm th, table.adm td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-actions form { display: flex; gap: 6px; }
.adm-actions input[type=text] { margin: 0; min-width: 160px; padding: 6px 8px; }
.scroll-x { overflow-x: auto; }

/* Poraštė */
footer { background: var(--ink); color: #dfe3ee; padding: 36px 0; font-size: 15px; }
footer a { color: #fff; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.page-head { padding: 44px 0 8px; }
.page-head p { color: var(--muted); max-width: 680px; }

/* Pagalbinės klasės (CSP neleidžia style="" atributų) */
.u-center { align-self: center; }
.u-stack { display: grid; gap: 22px; }
.u-h22 { font-size: 22px; }
.u-h24 { font-size: 24px; }
.u-mt8 { margin-top: 8px; }
.u-mt12 { margin-top: 12px; }
.u-mt14 { margin-top: 14px; }
.u-mt28 { margin-top: 28px; }
.u-mt36 { margin-top: 36px; }
.u-mt40 { margin-top: 40px; }
.u-m0 { margin: 0; }
.u-m0b { margin-bottom: 0; margin-left: 0; margin-right: 0; }
.u-pre { white-space: pre-line; }
.u-w380 { max-width: 380px; }
.u-w420 { max-width: 420px; }
.u-short { min-height: 80px; }
section.u-pt12 { padding-top: 12px; }
section.u-pt16 { padding-top: 16px; }
section.u-pt20 { padding-top: 20px; }
.subj { display: flex; flex-wrap: wrap; gap: 6px; }
