/* Layout of the public pages. Components and tokens come from styles/components.css. */
@import url("styles/components.css");

.hero { position: relative; background: var(--teal); color: var(--text-on-teal); overflow: hidden; }
.hero .site-header .logo, .hero .nav a, .hero .lang-switch { color: var(--text-on-teal); }
.hero .nav a:hover { border-color: var(--mustard); }
.hero .btn--secondary { border-color: var(--text-on-teal); color: var(--text-on-teal); }
.hero .btn--secondary:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s-7); align-items: end; padding-top: var(--s-7); position: relative; z-index: 1; }
.hero h1 { font: 400 var(--fs-display) / var(--lh-display) var(--font-display); letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--accent-on-teal); }
.hero .lede { font-size: var(--fs-lead); color: var(--text-on-teal-soft); max-width: 30em; margin: var(--s-5) 0 var(--s-6); }
.hero .copy { padding-bottom: var(--s-9); }
.poster { position: relative; aspect-ratio: 4 / 5; max-width: 420px; width: 100%; justify-self: end; }
.poster .sun { position: absolute; left: 50%; top: 4%; width: 62%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: var(--mustard); }
.poster .arch { position: absolute; inset: 22% 0 0 0; background: var(--rust); border-radius: var(--radius-arch); }
.poster .arch::after { content: ""; position: absolute; inset: 14% 22% 0; background: var(--paper); border-radius: var(--radius-arch); }
.band { background: var(--mustard); color: var(--text-on-mustard); border-block: var(--border); }
.band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6); padding: var(--s-4) 0; font: 400 22px / 1.2 var(--font-display); }

.sec { padding: var(--s-9) 0; }
.sec--rust { background: var(--rust); color: var(--text-on-rust); }
.sec--rust .kicker { color: var(--text-on-rust); }
.sec h2 { margin-bottom: var(--s-6); max-width: 18em; }
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-3 li { counter-increment: s; }
.steps-3 li::before { content: counter(s); display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--s-4); background: var(--teal); color: var(--text-on-teal); font: 400 30px / 1 var(--font-display); border-radius: 50%; }
.steps-3 li:nth-child(2)::before { background: var(--rust); color: #fff; border-radius: 32px 32px 0 0; }
.steps-3 li:nth-child(3)::before { background: var(--mustard); color: var(--text-on-mustard); border-radius: 12px; }
.steps-3 h3 { margin-bottom: var(--s-2); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.chips li { border: var(--border); border-radius: var(--radius-pill); padding: 10px 20px; background: var(--paper-raised); font-weight: 600; }
.sec--rust .chips li { color: var(--text); }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.way { border: var(--border); border-radius: var(--radius-l); padding: var(--s-6); background: var(--paper-raised); display: flex; flex-direction: column; gap: var(--s-3); }
.way--teal { background: var(--teal); color: var(--text-on-teal); }
.way--teal .kicker { color: var(--text-on-teal); }
.way .price { font: 400 54px / 1 var(--font-display); }
.way .price small { font: 400 17px / 1.3 var(--font-body); }
.way ul { margin: 0 0 var(--s-4); padding-left: 1.2em; }
.way .btn { align-self: flex-start; margin-top: auto; }
.way--teal .btn { background: var(--mustard); border-color: var(--mustard); color: var(--text-on-mustard); }
.way--teal .btn:hover { background: var(--paper); border-color: var(--paper); }
.faq details { border-top: 2px solid var(--ink); padding: var(--s-4) 0; max-width: 46em; }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { cursor: pointer; font: 400 24px / 1.25 var(--font-display); }
.faq details p { margin: var(--s-3) 0 0; }
.cta { background: var(--teal); color: var(--text-on-teal); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5); padding: var(--s-8) 0; }
.cta .btn { background: var(--mustard); border-color: var(--mustard); color: var(--text-on-mustard); }
.cta .btn:hover { background: var(--paper); border-color: var(--paper); }

/* the questions */
.start-top { border-bottom: var(--border); }
.start-top .site-header { padding: 16px 0; }
.q-wrap { width: min(820px, calc(100% - 48px)); margin: 0 auto; padding: var(--s-6) 0 var(--s-9); }
.q-meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin: var(--s-5) 0 var(--s-6); }
.q-card h1 { font: 400 var(--fs-h2) / var(--lh-heading) var(--font-display); margin-bottom: var(--s-3); }
.q-card h1:focus { outline: none; }
.q-card .lead { margin: 0 0 var(--s-5); }
.q-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.q-card legend { padding: 0; }
.q-options { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
.q-options.is-blocks { grid-template-columns: repeat(3, 1fr); }
.q-options.is-list { grid-template-columns: 1fr; }
.q-options .option.is-unknown { background: transparent; border-style: dashed; }
.q-options .option.is-unknown:has(input:checked) { background: var(--mustard); border-style: solid; }
.q-more { margin-top: var(--s-5); }
.q-nav { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; margin-top: var(--s-6); }
.q-nav .spacer { flex: 1; }
.q-price { position: sticky; bottom: var(--s-4); margin-top: var(--s-6); }
.q-price .meter { box-shadow: 0 0 0 3px var(--paper); }
.summary dt { font-weight: 600; margin-top: var(--s-4); }
.summary dd { margin: 0; display: flex; justify-content: space-between; gap: var(--s-4); border-bottom: 1px dashed var(--line); padding-bottom: var(--s-2); }
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.fork .way .price { font-size: 44px; }
.stack { display: grid; gap: var(--s-5); }

@media (max-width: 900px) {
  .hero-grid, .ways, .fork { grid-template-columns: 1fr; }
  .poster { justify-self: start; max-width: 300px; }
  .hero .copy { padding-bottom: var(--s-6); }
  .steps-3 { grid-template-columns: 1fr; }
  .q-options.is-blocks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .q-options, .q-options.is-blocks { grid-template-columns: 1fr; } .sec { padding: var(--s-8) 0; } }
.q-options .option b { padding-right: 34px; }
.trap { position: absolute; left: -9999px; }
.mt-5 { margin-top: var(--s-5); }
.sec--flush { padding-top: 0; }
.narrow { max-width: 14em; }
.foot-row { display: flex; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.logo--on-ink { color: var(--text-on-ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); }
.page-head { padding: var(--s-8) 0 var(--s-6); }
.page-head h1 { font: 400 var(--fs-h1) / var(--lh-heading) var(--font-display); max-width: 16em; }
.page-head .lead { margin-top: var(--s-4); }
.nav a.btn { border-bottom-width: 2px; }
/* Language switcher: a small LV / EN link between the menu and the main button (one link, to the same page in the other language) */
.lang-switch { font-size: var(--fs-small); font-weight: 600; letter-spacing: .06em; text-decoration: none; color: inherit; border: 1px solid currentColor; border-radius: var(--radius-s, 4px); padding: 2px 8px; }
@media (min-width: 801px) and (max-width: 1100px) { :lang(lv) .site-header .nav { gap: var(--s-4); font-size: 15px; } } /* Latvian labels are longer: a tighter menu keeps the header on one row */
.lang-switch:hover, .lang-switch:focus-visible { background: var(--mustard); color: var(--ink); border-color: var(--mustard); }
.calc { background: var(--paper-raised); border: var(--border); border-radius: var(--radius-l); padding: var(--s-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
.calc .results { display: grid; gap: var(--s-4); }
.calc .price-panel b { font-size: 40px; }
.calc .formula { font-size: var(--fs-small); color: var(--text-muted); }
.steps-list { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: var(--s-5); max-width: 46em; }
.steps-list li { counter-increment: n; display: grid; grid-template-columns: 56px 1fr; gap: var(--s-4); }
.steps-list li::before { content: counter(n); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: var(--text-on-teal); font: 400 24px / 1 var(--font-display); }
.steps-list h3 { margin-bottom: var(--s-1); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.tick-list, .cross-list { list-style: none; padding: 0; margin: var(--s-3) 0 0; display: grid; gap: var(--s-2); }
.tick-list li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.cross-list li::before { content: "– "; font-weight: 700; }
.contact-card { max-width: 34em; }
@media (max-width: 900px) { .calc, .two-col { grid-template-columns: 1fr; } .steps-list li { grid-template-columns: 1fr; } }
.mt-6 { margin-top: var(--s-6); }
@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; gap: var(--s-3) var(--s-4); }
  .site-header .nav { display: flex; flex-wrap: wrap; order: 3; width: 100%; gap: var(--s-2) var(--s-5); font-size: var(--fs-small); }
}

/* examples of our work on the home page */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); list-style: none; padding: 0; margin: var(--s-6) 0 0; }
.work figure { margin: 0; border: var(--border); border-radius: var(--radius-l); overflow: hidden; background: var(--paper-raised); height: 100%; display: flex; flex-direction: column; }
.work img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-bottom: var(--border); background: var(--paper); }
.work figcaption { display: grid; gap: var(--s-1); padding: var(--s-4) var(--s-5) var(--s-5); }
.work figcaption span { color: var(--text-muted); }
@media (max-width: 900px) { .work { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work { grid-template-columns: 1fr; } }

/* the whole example card opens the full page: the link text sits in the caption, its ::after stretches over the card */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.work li { position: relative; }
.work-open { margin-top: var(--s-2); font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.work-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-l); }
.work-open::before { content: "↗ "; text-decoration: none; display: inline-block; }
.work li:hover figure { box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.work li:hover .work-open { color: var(--rust); }
.work-open:focus-visible { outline: none; }
.work li:focus-within figure { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { .work figure { transition: transform .15s, box-shadow .15s; } }

/* account page */
.acct { max-width: 560px; }
.acct-social { display: grid; gap: var(--s-3); }
.acct-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; color: var(--text-muted); }
.acct-or::before, .acct-or::after { content: ""; flex: 1; border-top: 2px solid var(--ink); opacity: .25; }
.acct-tabs { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.acct-tab { flex: 1; min-height: 44px; border: var(--border); border-radius: var(--radius-pill); background: transparent; color: var(--text); font: 600 16px / 1 var(--font-body); cursor: pointer; }
.acct-tab[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--text-on-teal); }
.acct-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; }
.linklike { padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--rust); }
.linklike:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#a-notice:not(:empty) { margin-bottom: var(--s-4); }

/* the hidden attribute always hides, even on elements whose own style sets a display */
[hidden] { display: none !important; }

.input--code { max-width: 14em; font-variant-numeric: tabular-nums; letter-spacing: .2em; font-size: 1.25rem; }
.captcha { min-height: 0; }

/* show/hide button, strength bar, rules and match hint on password boxes */
.pw-wrap { position: relative; display: flex; }
.pw-wrap .input { flex: 1; padding-right: 5.5rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text); font: 600 15px / 1 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pw-toggle:hover { color: var(--rust); }
.pw-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.pw-meter { margin-top: var(--s-3); }
.pw-bar { display: flex; gap: 6px; }
.pw-bar span { flex: 1; height: 12px; border: 2px solid var(--ink); border-radius: 6px; background: transparent; }
.pw-bar[data-level="low"] span:nth-child(1) { background: var(--rust); }
.pw-bar[data-level="medium"] span:nth-child(-n+2) { background: var(--mustard); }
.pw-bar[data-level="high"] span { background: var(--teal); }
.pw-label { margin: var(--s-2) 0 var(--s-2); min-height: 1.4em; color: var(--text); }
.pw-rules { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: grid; gap: 4px; }
.pw-rules li { display: flex; gap: var(--s-2); align-items: baseline; color: var(--text-muted); }
.pw-rules li[data-ok="true"] { color: var(--text); font-weight: 600; }
.pw-mark { display: inline-block; width: 1.2em; text-align: center; }
.pw-rules li[data-ok="true"] .pw-mark { color: var(--teal); }
.pw-notes { margin: 0; color: var(--text-muted); font-size: .95rem; }
.pw-match { margin: var(--s-2) 0 0; }
.pw-match[data-state="same"] { color: var(--teal); font-weight: 600; }

/* Google and GitHub marks on the sign-in buttons (inline SVG: nothing to load, no policy change) */
.acct-social .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3); }
.brand-logo { width: 22px; height: 22px; flex: none; }

/* Signed-in account page: saved pages, answers, email, delete */
.acct-sec { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 2px solid var(--ink); }
.acct-sec h2 { margin-bottom: var(--s-3); }
.ws-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-4); }
.ws-item { padding: var(--s-4); border: var(--border); border-radius: var(--radius-m); background: var(--paper-raised); }
.ws-item .ws-name { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.ws-line { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.ws-off { color: var(--text-muted); }
.ws-admin { margin-top: var(--s-4); padding-top: var(--s-3); border-top: var(--border); }
.ws-admin h4, .ws-form h4 { margin: 0 0 var(--s-2); }
.ws-form { margin-top: var(--s-3); padding: var(--s-3); border: var(--border); border-radius: var(--radius-m); background: var(--paper); }
.pg-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-3); }
.pg-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); border: var(--border); border-radius: var(--radius-m); background: var(--paper-raised); }
.pg-item .pg-name { flex: 1 1 12em; font-weight: 600; overflow-wrap: anywhere; }
.pg-item .pg-meta { color: var(--text-muted); font-size: 0.9em; }
.pg-tag { padding: 2px 10px; border: 2px solid var(--ink); border-radius: var(--radius-pill); font-size: 0.85em; font-weight: 600; }
.pg-tag[data-status="paid"] { background: var(--mustard); color: var(--text-on-mustard); }
.pg-item .input { flex: 1 1 12em; }

/* guide page (E7.8): numbered steps with a "you should now see" line */
.guide { max-width: 46em; }
.guide section { margin-top: var(--s-7); }
.guide h2 { font: 400 var(--fs-h2, 32px) / 1.2 var(--font-display); }
.guide .checked { color: var(--ink-soft, #555); font-size: 14px; margin-top: 0; }
.guide .see { display: block; margin: var(--s-2) 0 var(--s-4); font-size: 15px; color: var(--teal, #0e5a5a); }
.guide table { border-collapse: collapse; width: 100%; }
.guide td, .guide th { border: 2px solid var(--ink); padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top; }
.guide .checklist { list-style: none; padding: 0; }
.guide code { background: rgba(0,0,0,.06); padding: 0 .3em; }
.guide, .guide td, .guide li { overflow-wrap: anywhere; }

/* phone: the header is one row (logo, Sign in, the main button) and the yellow band is one short line; the other links are in the footer and on the page */
@media (max-width: 560px) {
  .site-header { flex-wrap: nowrap; gap: var(--s-3); padding: 14px 0; }
  .site-header .nav { display: flex; order: 0; width: auto; margin-left: auto; font-size: var(--fs-small); }
  .site-header .nav a:not(:last-child) { display: none; }
  .site-header .nav a { white-space: nowrap; }
  .site-header .logo { gap: 8px; }
  .site-header .logo svg { width: 30px; height: 30px; }
  .site-header .btn { white-space: nowrap; padding-inline: 14px; }
  .site-header .lang-switch { display: none; } /* the header has no room for it on a phone: the footer has the same link */
  .site-header .logo { font-size: 26px; }
  .band .wrap { flex-wrap: nowrap; gap: var(--s-4); padding: var(--s-3) 0; font-size: 18px; }
  .band .wrap span:nth-child(n+3) { display: none; }
}
@media (max-width: 400px) {
  .site-header { gap: var(--s-2); }
  .site-header .logo { font-size: 24px; gap: 6px; }
  .site-header .nav { font-size: 14px; }
  .site-header .btn { padding: 10px 12px; font-size: 14px; }
  :lang(lv) .site-header .nav { font-size: 13px; } /* "Pieslēgties" is longer than "Sign in" */
}
/* very narrow: the icon alone stands for the name, so a signed-in header ("My account") still fits on one row */
@media (max-width: 340px) { .site-header .logo { font-size: 0; } .site-header .logo svg { width: 32px; height: 32px; } }

.spam-check { margin: 0.25rem 0; }
