/* Lag årshjul. Plain and practical, like the tools the customers already trust: white, light grey panels, one
   blue for what you can press, red only for red days (BRAND.md). */
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400 800; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.woff2) format("woff2"); }
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url(/fonts/young-serif-latin.woff2) format("woff2"); }

:root {
  --paper: #ffffff; --card: #ffffff; --soft: #eef2f6; --soft-2: #f6f8fa;
  --ink: #17212b; --muted: #55616d; --line: #d3dae2; --line-strong: #aeb9c5;
  --blue: #1b5bb5; --blue-dark: #134486; --blue-tint: #e3ecf8;
  --red: #c8202f; --red-dark: #a31a26; --band: #eef2f6;
  --sans: "Schibsted Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
  --step-3: clamp(1.6rem, 1.35rem + 1.2vw, 2.2rem);
  --step-4: clamp(1.9rem, 1.5rem + 1.8vw, 2.75rem);
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--sans); }
::selection { background: #cddcf2; color: var(--ink); }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0 0 1em; }
p, li { hyphens: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: 0 0 0.35em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 720px; }

/* Wordmark: «lag årshjul» with a small red wheel as the ring over the å. */
.brand { text-decoration: none; color: var(--ink); display: inline-flex; }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--sans); font-weight: 800; font-size: 1.45rem; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.wm-a { position: relative; display: inline-block; }
.wm-ring { position: absolute; left: 50%; top: -0.4em; width: 0.5em; height: 0.5em; transform: translateX(-50%); color: var(--red); }
.brand:hover .wm-ring { transform: translateX(-50%) rotate(30deg); transition: transform 0.4s ease; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding-top: 4px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--blue); text-decoration: underline; }
.editor-page .nav-cta { display: none; }
@media (max-width: 560px) { .nav a:not(.btn) { display: none; } .editor-page .nav a[href="/#pris"] { display: inline; } }
.banner { background: #fff6d6; border-bottom: 1px solid #ecd98f; color: #5c4a00; text-align: center; padding: 7px 16px; font-size: 0.9rem; }
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; background: var(--soft-2); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; } }
.footer-h { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: 0.7em; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--blue); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 48px; padding: 0 22px; border: 1px solid var(--blue); border-radius: 6px; background: var(--blue); color: #fff; font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn-ghost { background: var(--card); color: var(--blue); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--blue-tint); color: var(--blue-dark); border-color: var(--blue); }
.btn-big { min-height: 54px; font-size: 1.08rem; padding: 0 28px; }
label { font-weight: 500; }
input[type=text], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 12px; min-height: 46px; }
textarea { line-height: 1.6; resize: vertical; font-size: 1rem; }
input[type=text]:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
::placeholder { color: #7d8893; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; line-height: 1.45; margin: 14px 0; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.error { color: var(--red-dark); font-weight: 500; }

/* Topic-page hero (the front page is the tool, see .tool-band) */
.hero { padding: clamp(28px, 4vw, 56px) 0 clamp(36px, 5vw, 64px); }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 5fr 6fr; } }
.kicker { font-size: 0.95rem; font-weight: 500; color: var(--muted); margin-bottom: 0.6em; }
.lead { font-size: var(--step-1); line-height: 1.5; color: #2b3742; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 24px 0 18px; }
.wheel-stage { position: relative; max-width: 600px; width: 100%; justify-self: center; }
.wheel-card { background: var(--card); border: 1px solid var(--line); border-radius: 50%; padding: 2.2%; aspect-ratio: 1; }
.wheel-card svg, .wheel-card img { display: block; width: 100%; height: auto; }
.wheel-card img { border-radius: 50%; }

/* Sections */
.section { padding: clamp(44px, 6vw, 80px) 0; }
.section-band { background: var(--soft-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-soft { background: var(--soft-2); border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.paste { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 0.86rem; background: var(--soft-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; white-space: pre; overflow-x: auto; line-height: 1.6; }

.examples { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); }
@media (min-width: 700px) { .examples { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; } }
.example { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color 0.15s ease; }
.example:hover { border-color: var(--blue); color: var(--ink); }
.example img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.example strong { display: block; font-size: 1.1rem; margin-top: 10px; color: var(--blue); }
.example span { color: var(--muted); font-size: 0.92rem; }

/* Front page: three real examples */
.showcase { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .showcase { grid-template-columns: repeat(3, 1fr); } }
.show { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.show-img img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.show-text { display: flex; flex-direction: column; flex: 1; }
.show-who { color: var(--muted); font-size: 0.92rem; margin: 14px 0 2px; }
.show h3 { margin-bottom: 10px; }
.show-rings { list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.92rem; color: #2b3742; flex: 1; }
.show-rings li { padding: 6px 0; border-top: 1px solid var(--line); }
.show .btn { align-self: flex-start; }
.more-examples { margin-top: 24px; }

.price-grid { display: grid; gap: clamp(28px, 4vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.big-number { font-size: clamp(3rem, 2.4rem + 3vw, 4.6rem); font-weight: 800; line-height: 0.95; color: var(--ink); margin: 0 0 12px; letter-spacing: -0.03em; }
.big-number span { display: block; font-size: 1.05rem; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 8px; }
.checks { list-style: none; padding: 0; margin: 20px 0 26px; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 9px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 0.42em; width: 12px; height: 7px; border-left: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(-45deg); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.compare th, .compare td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-weight: 600; }
.compare tr.us td { font-weight: 600; }
@media (max-width: 520px) { .compare { font-size: 0.88rem; } .compare th, .compare td { padding-right: 6px; overflow-wrap: break-word; } }

.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.03rem; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -4px; font-size: 1.5rem; color: var(--blue); font-weight: 400; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; max-width: 68ch; }
.two-col { display: grid; gap: clamp(28px, 4vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1.4fr; } }
.about p { max-width: 46ch; }

/* The tool: front page and /lag */
.tool-band { background: var(--soft); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.home-head { padding: clamp(22px, 3vw, 36px) 0 6px; }
.home-head h1 { margin-bottom: 0.25em; }
.home-head .lead { margin-bottom: 0.8em; }
.editor-head { padding: 26px 0 4px; }
.editor-head h1 { font-size: var(--step-3); margin-bottom: 0.2em; }
.mine { background: var(--card); border-left: 4px solid var(--blue); padding: 10px 14px; margin: 0 0 14px; font-size: 0.95rem; border-radius: 4px; }
.pick { margin: 6px 0 16px; }
.pick-label { font-weight: 600; margin: 0 0 8px; }
.templates { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.95rem var(--sans); background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 14px; min-height: 42px; cursor: pointer; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 600px) {
  .templates { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * clamp(16px, 4vw, 40px)); padding: 0 clamp(16px, 4vw, 40px) 4px; scrollbar-width: none; }
  .chip { flex: none; }
}
.editor { display: grid; gap: 16px 28px; grid-template-columns: minmax(0, 1fr); padding-bottom: 32px; }
.preview-col { display: contents; }
.preview-card { order: 1; }
.form-col { order: 2; min-width: 0; }
.warnings { order: 3; }
.buy-box { order: 4; }
@media (min-width: 1040px) {
  .editor { grid-template-columns: minmax(380px, 5fr) 7fr; align-items: start; }
  .preview-col { display: block; position: sticky; top: 16px; order: 2; }
  .form-col { order: 1; }
}
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 0.7em; letter-spacing: 0; }
.help summary { cursor: pointer; font-weight: 600; }
.help[open] summary { margin-bottom: 10px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 0.95rem; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.toggles { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.toggles label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; min-height: 36px; }
.toggles input { width: 20px; height: 20px; accent-color: var(--blue); }
.ring { border-left: 6px solid var(--ring, var(--line)); }
.ring-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ring-top input { flex: 1; font-weight: 600; min-width: 0; }
.icon-btn { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--soft-2); border-radius: 6px; cursor: pointer; font-size: 1.05rem; color: var(--ink); }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink); }
.ring-errors { margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.88rem; color: var(--red-dark); }
.ring-errors li { margin-bottom: 4px; }
.ring-count { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.add-ring { width: 100%; }
.preview-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(8px, 2vw, 22px); }
.preview-card svg { display: block; width: 100%; height: auto; }
.warnings { margin: 12px 0 0; padding: 10px 14px; list-style: none; background: #fff6d6; border-radius: 6px; font-size: 0.9rem; color: #5c4a00; }
.warnings:empty { display: none; }
.buy-box { margin-top: 14px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 20px; }
.buy-title { font-size: 1.15rem; margin-bottom: 0.4em; letter-spacing: 0; }
.buy-box .price-line { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.buy-box .price-line strong { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.buy-what { margin: 10px 0 0; }
.save-state { font-size: 0.9rem; color: var(--muted); }

/* Order and delivery */
.order { padding: 40px 0; }
.downloads { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 24px 0; }
.download { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.download:hover { border-color: var(--blue); color: var(--ink); }
.download strong { font-size: 1.05rem; }
.download span { font-size: 0.88rem; color: var(--muted); }
.download.primary { border: 2px solid var(--blue); }
.order-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .order-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Legal and articles */
.legal, .article { padding: 48px 0; }
.legal h2, .article h2 { font-size: var(--step-2); margin-top: 1.6em; }
.legal p, .legal li, .article p, .article li { max-width: 70ch; }
.article figure { margin: 28px 0; }
.article figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .banner { display: none; } }
