/* Meldewart: one stylesheet for the front page, the account pages and the app. Phone first. */
:root {
  --brand: #0f5c6e;
  --brand-dark: #0a4352;
  --brand-tint: #e7f1f3;
  --ink: #12222a;
  --muted: #536670;
  --line: #d9e3e6;
  --bg: #ffffff;
  --soft: #f4f7f8;
  --red: #b42318;
  --red-tint: #fdecea;
  --amber: #8a5a00;
  --amber-tint: #fff4dc;
  --green: #18663a;
  --green-tint: #e6f4ec;
  --radius: 10px;
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }
.foot-note { max-width: 70ch; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #5fb3c6; outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: .95rem; }
.btn.danger { background: #fff; color: var(--red); border-color: #e4b4ae; }
.btn.danger:hover { background: var(--red-tint); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.wrap { white-space: normal; text-align: center; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 44px; }

/* nav */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.top .brand { min-height: 44px; min-width: 44px; flex: none; }
@media (max-width: 439px) { .top .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .top .wrap { gap: 12px; } }
.top .links { display: flex; align-items: center; gap: 16px; margin-left: auto; min-width: 0; }
.top .links a.plain { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 10px 0; }
.top .links a.plain:hover { color: var(--brand); }
.top .links .linkbtn { color: var(--ink); text-decoration: none; font-size: .95rem; }
.top .hide-s { display: none; }
@media (min-width: 820px) { .top .hide-s { display: inline; } }

/* front page */
.hero { padding: 44px 0 56px; background: linear-gradient(180deg, #f3f8f9 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero .grid { display: grid; gap: 40px; }
@media (min-width: 980px) { .hero .grid { grid-template-columns: 1fr 1.05fr; align-items: center; } .hero { padding: 72px 0 80px; } }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--brand); background: var(--brand-tint); padding: 5px 10px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); margin-bottom: 18px; }
.hero .sub { font-size: 1.08rem; color: #2c3e46; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; }
.nocard { font-size: .92rem; color: var(--muted); }

.screen { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px -24px rgba(15, 60, 75, .35); overflow: hidden; }
.screen-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft); font-size: .82rem; color: var(--muted); }
.screen-bar .dots { display: flex; gap: 5px; }
.screen-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #c9d5d9; display: block; }
.screen-body { padding: 16px; }
.screen-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; margin-bottom: 12px; }
.screen-head strong { font-size: 1rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.red { background: var(--red-tint); color: var(--red); border-color: #f2c4bf; }
.tag.amber { background: var(--amber-tint); color: var(--amber); border-color: #f0dca8; }
.tag.green { background: var(--green-tint); color: var(--green); border-color: #bfe0cc; }
.tag.brand { background: var(--brand-tint); color: var(--brand); border-color: #c5dde3; }

.comp { border-top: 1px solid var(--line); padding-top: 4px; margin-bottom: 8px; }
.comp-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0 4px; }
.comp-h b { font-size: .95rem; }
.adv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 4px 0 10px 12px; border-left: 3px solid var(--line); font-size: .86rem; }
.adv > * { align-self: start; }
.adv .t { font-weight: 600; color: var(--ink); overflow-wrap: break-word; hyphens: auto; }
.adv .m { color: var(--muted); grid-column: 1 / -1; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.hi { color: var(--red); }
.score.mid { color: var(--amber); }

section { padding: 44px 0; }
@media (min-width: 820px) { section { padding: 64px 0; } }
section.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-size: .95rem; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
section h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 14px; }
.lead { font-size: 1.05rem; color: #2c3e46; max-width: 44em; }

.steps { display: grid; gap: 18px; margin-top: 28px; counter-reset: s; padding: 0; list-style: none; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps h3 { font-size: 1.1rem; }
.steps p { color: #3b4d55; margin: 0; }

.features { display: grid; gap: 18px; margin-top: 28px; }
@media (min-width: 820px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { border-top: 3px solid var(--brand); padding: 18px 4px 0; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: #3b4d55; margin: 0; }

.two { display: grid; gap: 28px; margin-top: 30px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; align-items: start; } }

.mail { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .9rem; }
.mail-h { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--soft); }
.mail-h div { color: var(--muted); font-size: .82rem; }
.mail-h strong { display: block; margin-top: 2px; }
.mail-b { padding: 16px; }
.mail-b dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.mail-b dt { color: var(--muted); }
.mail-b dd { margin: 0; }
.deadlines { border: 1px solid #f2c4bf; background: var(--red-tint); border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.deadlines ul { margin: 6px 0 0; padding-left: 18px; }
.draft { font-family: var(--mono); font-size: .8rem; background: #fff; border: 1px dashed #d9b6b1; border-radius: 6px; padding: 10px; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

.week { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
.week th, .week td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.week th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

.latest { list-style: none; padding: 0; margin: 24px 0 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.latest li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.latest li:last-child { border-bottom: 0; }
.latest .meta { font-size: .82rem; color: var(--muted); grid-column: 1 / -1; }
/* the list is refreshed from the live data after load: a fixed-height box, so nothing below it moves */
#latest { height: 32rem; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 820px) { #latest { height: 26rem; } }
.latest a { font-weight: 600; text-decoration: none; color: var(--ink); }
.latest a:hover { color: var(--brand); text-decoration: underline; }

.demo { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 24px; }
.demo form { display: flex; flex-wrap: wrap; gap: 10px; }
.demo input { flex: 1 1 260px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip { border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 500 .9rem var(--font); cursor: pointer; min-height: 44px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); }

.sources { display: grid; gap: 12px; margin-top: 24px; padding: 0; list-style: none; }
@media (min-width: 820px) { .sources { grid-template-columns: 1fr 1fr; } }
.sources li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.sources b { display: block; }

.who { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 820px) { .who { grid-template-columns: repeat(3, 1fr); } }
.who div { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; }

.price-card { background: #fff; border: 2px solid var(--brand); border-radius: 16px; padding: 28px; max-width: 520px; margin-top: 28px; }
.price-card .amount { font-size: 3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.price-card .per { font-size: 1.05rem; color: var(--muted); font-weight: 500; }
.price-card ul { padding: 0; list-style: none; margin: 20px 0 24px; }
.price-card li { padding: 7px 0 7px 28px; position: relative; border-bottom: 1px solid var(--line); }
.price-card li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 28px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: #3b4d55; }

.band { background: var(--brand); color: #fff; padding: 56px 0; }
.band h2 { color: #fff; }
.band p { color: #d7ebf0; }
.band .btn { background: #fff; color: var(--brand); border-color: #fff; }
.band .btn:hover { background: var(--brand-tint); }

.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: .9rem; color: var(--muted); background: #fff; }
.foot .wrap { display: grid; gap: 12px; }
.foot a { color: var(--muted); display: inline-block; padding: 11px 0; min-height: 44px; overflow-wrap: anywhere; }
.foot .syng-legal-links a { padding: 11px 8px; min-width: 44px; text-align: center; }
.foot .syng-legal-links a:first-child { padding-left: 0; }
.price-card.flat { border: 0; border-top: 2px solid var(--brand); border-radius: 0; padding: 20px 0 0; max-width: none; }
.foot .syng-legal-links a { color: var(--ink); }

/* forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=datetime-local], textarea, select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c8cd; border-radius: 8px; font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: 3px solid #cfe5ea; outline-offset: 0; }
.field { margin-bottom: 16px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: .92rem; margin: 0 0 14px; }
.msg.err { background: var(--red-tint); color: #7a1a12; border: 1px solid #f2c4bf; }
.msg.ok { background: var(--green-tint); color: #12502d; border: 1px solid #bfe0cc; }
.msg.info { background: var(--brand-tint); color: #0b4554; border: 1px solid #c5dde3; }
.msg:empty { display: none; }

/* account pages */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 48px 20px; background: var(--soft); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; width: 100%; max-width: 440px; }
.card h1 { font-size: 1.55rem; }
.card .btn { width: 100%; }
.alt-links { margin-top: 18px; font-size: .92rem; color: var(--muted); }

/* app */
.app-main { padding: 28px 0 60px; background: var(--soft); min-height: calc(100vh - 64px); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.panel h2 { font-size: 1.25rem; }
.status { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; font: 600 .95rem var(--font); cursor: pointer; min-height: 42px; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.addrow { display: grid; gap: 10px; }
@media (min-width: 760px) { .addrow { grid-template-columns: 2fr 1fr auto; align-items: end; } }
.c-card { border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; background: #fff; }
.c-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 14px 16px; }
.c-head h3 { font-size: 1.05rem; margin: 0; }
.c-head .sp { flex: 1; }
.c-meta { padding: 0 16px 12px; font-size: .84rem; color: var(--muted); }
.c-list { border-top: 1px solid var(--line); }
.m-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.m-row:last-child { border-bottom: 0; }
@media (min-width: 760px) { .m-row { grid-template-columns: 96px 1fr 70px 150px; align-items: start; gap: 12px; } }
.m-row .d { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.m-row .ti a { font-weight: 600; color: var(--ink); text-decoration: none; }
.m-row .ti a:hover { color: var(--brand); text-decoration: underline; }
.m-row .sub { font-size: .82rem; color: var(--muted); }
.m-row .act { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.m-row.muted-row { opacity: .7; }
.empty { padding: 16px; color: var(--muted); font-size: .92rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #c5dde3; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); color: var(--ink); }
dialog::backdrop { background: rgba(10, 30, 38, .45); }
.dlg-h { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-h h2 { font-size: 1.15rem; margin: 0; }
.dlg-b { padding: 18px 20px 24px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.choice { display: grid; gap: 8px; margin-bottom: 12px; }
.choice label { display: flex; gap: 10px; align-items: center; font-weight: 500; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; margin: 0; }
.choice input { width: 18px; height: 18px; }
.history { font-size: .86rem; color: var(--muted); margin-top: 14px; }
.history li { margin-bottom: 4px; }
.closex { background: none; border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 40px; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
