/* Page CSS of the front page: only what sits inside a visual, plus the calculator and the list rows
   the kit has no class for. Everything else is the kit (system.css, cards.css, layout.css). */

/* the three facts: the figure at the right of each row, at the size of a stat */
.law .rows__value { font-size: var(--t-stat); }


/* the product window in the section "the things": the list beside the open receipt, in one frame */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* the calculator, a piece of the product on the lit frame */
.calc__body { display: grid; gap: var(--s-5); }
.calc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.calc__grid dt { font-size: var(--t-small); font-weight: 500; color: var(--muted); }
.calc__grid dd { margin: var(--s-1) 0 0; }
@media (max-width: 639px) { .calc__grid { grid-template-columns: minmax(0, 1fr); } }

/* the three cards: one panel height */

/* the notices on the lit frame */
.notices, .addresses { min-height: 320px; }
.notices .stage > .at-rise, .addresses .stage > .at-rise { --ax: max(24px, 50% - 190px); --ay: 40px; }

/* a link under a list or a paragraph keeps its distance */
.after { margin-block: var(--s-6); }
.calc-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.calc-head > p { color: var(--ink); }

/* the lines of the open receipt */
.rcpt { display: grid; margin: var(--s-3) 0; }
.rcpt > li { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: 6px; font-size: 13px; line-height: 20px; color: var(--u-text-2); box-shadow: inset 0 -1px 0 var(--u-line); font-variant-numeric: tabular-nums; }

/* the three steps: the number stands in the heading, so all text starts on the left line */
.steps { display: grid; gap: var(--s-5); counter-reset: step; }
.steps > li { display: grid; gap: var(--s-1); counter-increment: step; }
.steps h3, .calc-head h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.steps__n { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: var(--s-3); border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong, var(--line)); color: var(--accent); font: 500 var(--t-small)/1 var(--font-mono); vertical-align: middle; }
.steps__n::before { content: counter(step); }
.steps > li > p { color: var(--ink); max-width: 46ch; }
.trial { min-height: 280px; }
.trial .stage > .at-rise { --ax: max(24px, 50% - 190px); --ay: 32px; }
.trial { margin-top: var(--s-6); }

/* the law section: the facts on the left, the calculator on a lit frame the full height at the right */
.law-grid > .calcframe { align-self: stretch; display: grid; place-items: center; padding: var(--s-6); }
.calc { display: grid; gap: var(--s-5); padding: var(--s-6); width: 100%; max-width: 480px; }
.calc__body { display: grid; gap: var(--s-5); }
@media (max-width: 1023px) { .law-grid > .calcframe { min-height: 0; } }

/* the price section: the head and the trial mails on the first screen, the plans on the second */
.price-head > .span-6 > .trial { margin-top: 0; min-height: 320px; }
@media (max-width: 639px) {
  .law-grid > .calcframe { padding: var(--s-4); }
  .calc { padding: var(--s-4); }
}
.price-head .trial .stage > .at-rise { --fit-max: 420px; --ay: 48px; }
/* the AI add-on note: a solid dark panel (the cobalt gradient behind it fails contrast), drawn like the plan cards */
.addon { color: var(--ink); background: #05071f; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.app.ui { max-height: 580px; }

/* the tablet (640 to 1023): the stacked sections run to two screens, and the foot too */
@media (min-width: 640px) and (max-width: 1023px) {
  #pris .grid > .card--plan { grid-column: auto / span 6; }
  .price-head > .span-6 > .trial { min-height: 200px; }
}
/* the phone: the foot's link columns two to a row, so it stays within its two screens */
@media (max-width: 639px) {
  .footer .footer__col { grid-column: span 6; }
}

/* the product shown as a web app, not as a program on a desktop: no window buttons and no title bar,
   a plain app header (logo, page name, search) and a flat edge */
.ui-win .ui-dots { display: none; }
.ui-win__bar { padding-left: 16px; }

/* the plan cards never run past the screen */
.card--plan { min-width: 0; overflow-wrap: anywhere; }
.price { flex-wrap: wrap; }
@media (max-width: 639px) {
  #pris .card--plan > p:nth-of-type(1) { display: none; }
  .price-head > .span-6:last-child { display: block; }
  .price-head > .span-6 > .trial { min-height: 300px; }
}

/* a large screen: sections keep the height they have on a laptop instead of stretching with the window,
   and the pieces of the product are drawn larger, so frames are not left mostly empty */
@media (min-width: 1280px) and (min-height: 901px) {
  main > section:not(.hero), footer.closing { height: calc(var(--h, 1) * 900px); }
}
@media (min-width: 1700px) {
  .stage .fit > .ui, .stage .fit > .ui-win, .stage .at-corner > .ui { zoom: 1.3; }
}

/* the pieces on the lit frames are drawn a little larger, so the frames are not left mostly empty */
@media (min-width: 1024px) {
  .notices .at-rise > .ui, .addresses .at-rise > .ui, .trial .at-rise > .ui { zoom: 1.2; }
}

/* every piece sits whole on its frame with even ground round it (or is cut cleanly by the frame's edge):
   the frames are as tall as the piece plus the ground above and below it */
.notices, .addresses { min-height: 400px; }
.trial { min-height: 300px; }
.price-head > .span-6 > .trial { min-height: 340px; }
.notices .stage > .at-rise, .addresses .stage > .at-rise, .trial .stage > .at-rise, .price-head .trial .stage > .at-rise { --ay: 56px; }


/* the open receipt fills its pane: the page on the left, its note beside it, so nothing lies over the lines */
.app .ui-doc { width: 100%; padding: var(--s-6) var(--s-6) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: var(--s-4); align-items: start; }
.app .ui-doc__note { position: static; transform: none; opacity: 1; width: auto; }
@media (max-width: 639px) { .app .ui-doc { grid-template-columns: minmax(0, 1fr); } }


/* ------------------------------------------------------------------ warmth and colour */
/* the page ground: cream with a faint cobalt light in the top right corner and a sand light below */
body { background:
  radial-gradient(900px 520px at 88% -8%, color-mix(in oklab, var(--p-accent) 11%, transparent), transparent 70%),
  var(--p-bg); }
.hero { background: radial-gradient(760px 460px at 4% 108%, color-mix(in oklab, var(--p-surface) 90%, transparent), transparent 70%); }

/* the status marks carry the colour the words mean: covered green, soon amber, expired red.
   Scoped under .ui-win, because ui.js links the fragment's own CSS after this file and its
   .is-done colour would otherwise win over the green ground (light text on light green). */
.ui-win .ui-win__st.is-ok, .ui-win .ui-win__st.is-done { color: #15663a; background: #e3f3e9; box-shadow: inset 0 0 0 1px #bfe2cc; }
.ui-win .ui-win__st.is-you { color: #8a5300; background: #fdf0d5; box-shadow: inset 0 0 0 1px #f0d49a; }
.ui-win .ui-win__st.is-you::before { background: #d98a00; }
.ui-win .ui-win__st.is-bad { color: #a3271b; background: #fde6e3; box-shadow: inset 0 0 0 1px #f3bdb7; }
.ui-win .ui-win__st.is-ok::before, .ui-win .ui-win__st.is-done::before { background: #1f9d55; opacity: 1; }
.ui-win .ui-win__st.is-bad::before { background: #d4382b; opacity: 1; }

/* three facts under the buttons, with a check in the accent */
.trust { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); }
.trust > li { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--ink); }
.trust > li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }


/* bands of cobalt and deep navy: the strongest colour on the page, holding the strongest content */
.ground-cobalt, .ground-navy { color: #fff; --ink: #fff; --muted: rgb(255 255 255 / .82); --line: rgb(255 255 255 / .28); --line-strong: rgb(255 255 255 / .5); --action: var(--p-action); --action-ink: #fff; --accent: #fff; }
.ground-cobalt { background: var(--p-accent); }
.ground-navy { background: radial-gradient(900px 560px at 85% 0%, #2a38f0 0%, transparent 65%), #0a0e66; }
:is(.ground-cobalt, .ground-navy) :is(h1, h2, h3, p, li, .rows__name, .rows__value, .t-lead, .section-head) { color: #fff; }
:is(.ground-cobalt, .ground-navy) .link { color: #fff; text-decoration-color: rgb(255 255 255 / .6); }
:is(.ground-cobalt, .ground-navy) .btn--secondary { color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .55); background: transparent; }
/* white product pieces on a band keep the light tokens */
:is(.ground-cobalt, .ground-navy) :is(.ui, .card--plan, .frame) { --ink: var(--p-ink); --muted: var(--p-muted); --line: #dfe5f7; --line-strong: #c4cdee; --accent: var(--p-accent); --action: var(--p-action); --action-ink: #fff; color: var(--p-ink); }
/* the status chips keep their own colours (green, amber, red on a light ground) */
:is(.ground-cobalt, .ground-navy) :is(.ui, .card--plan) :is(h2, h3, p, li, label, dt, dd, input, span:not(.ui-win__st), .t-small) { color: inherit; }
:is(.ground-cobalt, .ground-navy) :is(.ui, .card--plan, .frame) { box-shadow: 0 28px 56px -28px rgb(0 0 40 / .6); }
:is(.ground-cobalt, .ground-navy) .frame { background: transparent; box-shadow: none; }
.ground-navy .trust > li { color: #fff; }
.ground-navy .trust > li::before { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%231f2de6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.hero.ground-navy { background: radial-gradient(900px 560px at 85% 0%, #2a38f0 0%, transparent 65%), #0a0e66; }
/* the law facts: big cobalt figures on light blue */
.law .rows__value { color: var(--p-accent); font-size: clamp(2rem, 3.2vw, 2.7rem); font-weight: 600; letter-spacing: -.03em; }

/* pricing on one screen: the cards drop their tagline (the price and the list say the same) */
#pris .card--plan > p:nth-of-type(1) { display: none; }
#pris .card--plan { padding-block: var(--s-5); }
#pris .card--plan { padding-block: var(--s-4); }
#pris .section-head + .after, #pris .after { margin-top: var(--s-3); }
/* the free plan's button on a light card (light theme): keep its own colours, not the band's white.
   In the dark theme the card is dark, and the band's own outline button is the secondary. */
html[data-theme="light"] #pris .card--plan .btn--secondary { color: var(--p-accent); background: #fff; box-shadow: inset 0 0 0 1px var(--p-accent); }
#pris .price-head .after { display: none; }
#pris .section-head p { margin-bottom: 0; }
.ground-navy .btn--primary { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); }
/* Dark theme paints the primary button white. The navy band used to force white text on a cobalt button. */
html[data-theme="dark"] :is(.ground-cobalt, .ground-navy),
html[data-theme="dark"] :is(.ground-cobalt, .ground-navy) :is(.ui, .card--plan, .frame) {
  --action-ink: var(--p-action-ink);
}


/* the diagram card in "three steps": the frame is the panel the diagram fills */
.flow { min-height: 340px; }

/* the law section: the calculator card starts on the line the heading starts on */
.law-grid > .calcframe { align-content: start; place-items: start stretch; padding-top: 0; }

/* the dialog laid over the window: same buttons as the page (the fill is the accent; Edit is an outline) */
.ui-cursor .ui-cursor__go { background: var(--p-accent); color: #fff; }
.ui-cursor .ui-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--p-accent); color: var(--p-accent); }

/* a section with less content than its screen has even ground above and below it, not an empty lower half */
@media (min-width: 1024px) {
  main > section:not(.hero) > .wrap.grid { align-content: safe center; }
  main > section:not(.hero) > .wrap:not(.grid) { justify-content: safe center; }
}

/* the notices of the last step: three cards, the reminder in the accent */
.notice-stack { display: grid; gap: var(--s-3); width: min(100%, 420px); margin: 0; padding: 0; list-style: none; }
.notice { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: start; padding: var(--s-4); border-radius: var(--r-md); background: #fff; color: #0d1230; box-shadow: 0 14px 30px -18px rgb(10 14 102 / .35); }
.notice__dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 999px; background: var(--line-strong, #c4cdee); }
.notice.is-last .notice__dot { background: var(--p-accent); }
.notice__text { display: grid; gap: 2px; font-size: 14px; }
.notice__text b { font-weight: 600; }
.notice__text span { color: #4a5270; }
.notice__time { font-size: 12px; color: #4a5270; }
.notice.is-last { outline: 2px solid var(--p-accent); }


/* the address switches: a 44px tap target, the 32x20 track drawn inside it */
.ui-tg .ui-switch { width: 44px; height: 44px; background: transparent !important; box-shadow: none !important; }
.ui-tg .ui-switch::before { content: ""; position: absolute; left: 6px; top: 12px; width: 32px; height: 20px; border-radius: 999px; background: var(--u-fill-3); box-shadow: inset 0 0 0 1px var(--u-line); transition: background-color 240ms var(--u-ease), box-shadow 240ms var(--u-ease); }
.ui-tg .ui-switch.is-on::before { background: var(--u-ink); box-shadow: none; }
.ui-tg.is-active .ui-switch.is-on::before { background: var(--u-accent); }
.ui-tg .ui-switch i { top: 14px; left: 8px; z-index: 1; }

/* the phone: sections hold whole screens so no neighbour peeks in */
@media (max-width: 639px) {
  #pris { --hm: 2; }
  #pris > .wrap { justify-content: center; }
}


/* the hero: centred words on deep navy under a lit arc, with the product window rising from the bottom edge
   in a glowing frame; hairlines at the .wrap edges with a plus at each top corner */
main > .hero.hero--stage { height: 100svh; min-height: 0; overflow: hidden; padding-block: calc(var(--nav) + var(--s-8)) 0; background: radial-gradient(1100px 520px at 50% 0, #131c78 0%, transparent 70%), #05071f; }
main > .hero.hero--stage::after { content: ""; position: absolute; z-index: 0; inset-block: 0; left: 50%; width: min(100% - 2 * var(--gut), var(--container)); translate: -50% 0; border-inline: 1px solid rgb(255 255 255 / .1); pointer-events: none; }
main > .hero.hero--stage::before { content: ""; position: absolute; z-index: 0; top: calc(var(--nav) - 8px); left: 50%; width: var(--planet-w); aspect-ratio: 1; translate: -50% 0; border-radius: 50%; box-shadow: inset 0 2px 0 rgb(255 255 255 / .92), inset 0 42px 72px -30px rgb(88 116 255 / .8); pointer-events: none; }
main > .hero.hero--stage > .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--s-8); height: 100%; }
main > .hero.hero--stage > .wrap::before, main > .hero.hero--stage > .wrap::after { content: "+"; position: absolute; top: calc(-1 * (var(--nav) + var(--s-8)) + var(--nav)); font: 300 20px/1 var(--font-text); color: rgb(255 255 255 / .55); }
main > .hero.hero--stage > .wrap::before { left: -6px; }
main > .hero.hero--stage > .wrap::after { right: -6px; }
.hero-center { max-width: 820px; text-align: center; }
.hero-center h1 { margin: 0; font-size: clamp(38px, 5.2vw, 72px); line-height: 1.04; }
.hero-center .hero__lead { margin: var(--s-5) auto 0; max-width: 54ch; font-size: 18px; color: rgb(255 255 255 / .85); }
.hero-center .btn-row { justify-content: center; margin-top: var(--s-6); }
.hero-note { margin: var(--s-4) 0 0; color: rgb(255 255 255 / .72); font-size: var(--t-small); }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5); margin: var(--s-5) 0 0; padding: 0; list-style: none; color: rgb(255 255 255 / .85); font-size: var(--t-small); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points img { filter: invert(1); }
/* the hero is one screen: the window takes the room under the text and runs off its lower edge */
.hero-window { position: relative; width: min(100% - 80px, 1100px); flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.hero-window__frame { flex: 1 1 auto; min-height: 0; max-height: 480px; overflow: hidden; border: 1px solid rgb(110 128 255 / .85); border-bottom: 0; border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 0 90px -10px rgb(58 78 255 / .65), 0 -30px 120px -20px rgb(58 78 255 / .5); }
.hero-window__frame > .ui { width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hero-dlg { position: absolute; right: 24px; bottom: 32px; width: min(300px, 32%); }
.hero-dlg .ui-cursor { width: 100%; box-shadow: 0 28px 56px -24px rgb(0 0 40 / .6); }
@media (max-width: 1023px) { .hero-dlg { display: none; } .hero-window__frame { max-height: 400px; } }
@media (max-width: 639px) {
  main > .hero.hero--stage { padding-top: calc(var(--nav) + var(--s-6)); }
  main > .hero.hero--stage::after { display: none; }
  main > .hero.hero--stage > .wrap { gap: var(--s-6); }
  main > .hero.hero--stage > .wrap::before, main > .hero.hero--stage > .wrap::after { display: none; }
  .hero-center .hero__lead { font-size: 16px; }
  /* one point a line: a centred block with the icons on one line, not three lines each centred on its own */
  .hero-points { flex-direction: column; align-items: flex-start; width: fit-content; margin-inline: auto; text-align: left; }
  .hero-window { width: calc(100% - 32px); }
  .hero-window__frame { max-height: 288px; }
}

/* the three steps: the product piece sits in the shared frame, and on a phone under its own step */
#trin .mo-pc__visual { overflow: hidden; }
#trin .mo-pc__visual > * { width: 100%; margin: 0; }
#trin:not(.is-live) .mo-pc__visual { max-height: 280px; }
#trin .dg { min-height: 0; }

/* the statement: the law in capitals, centred, with the three facts in a row under it */
.statement { align-items: center; text-align: center; }
.statement__text { max-width: 24em; margin: 0 auto; font-size: clamp(26px, 4.2vw, 60px); line-height: 1.2; letter-spacing: 0.02em; text-transform: uppercase; text-wrap: balance; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); width: 100%; margin: var(--s-9, 96px) 0 0; padding: 0; list-style: none; text-align: left; }
.facts > li { display: grid; gap: var(--s-2); align-content: start; padding-top: var(--s-4); border-top: 1px solid var(--line-strong, var(--line)); }
.facts__big { color: #d5dcff; font-size: clamp(2.4rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.facts h3 { margin: var(--s-2) 0 0; font: 600 var(--t-card)/1.3 var(--font-text); }
.facts p { margin: 0; color: var(--ink); }
/* on a phone the heading must still read first: a larger statement, smaller numbers */
@media (max-width: 639px) {
  .statement__text { font-size: 30px; }
  .facts__big { font-size: 1.75rem; }
}
@media (max-width: 1023px) { .facts { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); margin-top: var(--s-6); } }

#beregner .calcframe { align-self: center; }
