/* Gemensam stil för Corders undersidor (guider). Startsidan har sin egen inline-CSS. */
:root {
  --ink: #111111;
  --muted: #6e6e6e;
  --faint: #a3a3a3;
  --line: #e7e7e7;
  --paper: #ffffff;
  --soft: #f4f4f2;
  --stone: #3b3c40;
  --max: 1280px;
  --read: 680px;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.caps { font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

/* Header + läsframsteg */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font: 400 1.6rem/1 Jost, sans-serif; letter-spacing: .03em; text-decoration: none; }
.top ul { display: flex; gap: clamp(20px, 4vw, 48px); list-style: none; margin: 0; padding: 0; font-size: .85rem; font-weight: 500; }
.top ul a { text-decoration: none; }
.top ul a:hover, .top ul a[aria-current] { color: var(--muted); }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--read-p, 0)); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .top ul { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; font: 500 .9rem "Inter Tight", sans-serif; padding: 6px 0; cursor: pointer; position: relative; z-index: 2; }
  .menu-btn span, .menu-btn span::before { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s; }
  .menu-btn span::before { content: ""; position: absolute; top: 5px; }
  .menu-btn span { top: -2.5px; }
  .menu-btn b { font-weight: 500; }
  .top.open .menu-btn span { opacity: 0; }
  .top.open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink); color: #fff; }
  .top.open ul { display: flex; position: fixed; left: 0; right: 0; top: 64px; bottom: 0; flex-direction: column; justify-content: center; gap: 6px; padding: 0 var(--gutter); background: var(--ink); }
  .top.open ul a { font-size: 2.2rem; font-weight: 300; letter-spacing: -.02em; color: #fff; }
}

/* Omslag */
.cover { position: relative; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: var(--cover-bg, var(--soft)); }
.cover > img { position: absolute; top: 8%; left: 50%; height: 84%; width: auto; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 30px 40px rgba(0,0,0,.18)); }
.cover-pair { position: absolute; inset: 8% 0; display: flex; align-items: center; justify-content: center; }
.cover-pair img { height: 100%; width: auto; max-width: none; filter: drop-shadow(0 30px 40px rgba(0,0,0,.18)); }
.cover-pair img:first-child { transform: rotate(-7deg); }
.cover-pair img + img { margin-left: -6%; transform: rotate(7deg) translateY(3%); }
.cover { container-type: inline-size; }
.cover-text { white-space: nowrap; font: 300 clamp(3rem, 24cqw, 11rem)/1 "Inter Tight", sans-serif; letter-spacing: -.05em; color: rgba(255,255,255,.92); }
.cover-text small { display: block; font-size: .14em; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: .6em; text-align: center; }

/* Guide: rubrikdel */
.post-head { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); max-width: 900px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 26px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.post-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 300; letter-spacing: -.03em; margin-top: 18px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: .85rem; color: var(--muted); }
.post-meta span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); vertical-align: middle; margin-right: 10px; }
.post-meta span:first-child::before { display: none; }
.post-cover { aspect-ratio: 21 / 9; margin-bottom: clamp(40px, 6vw, 80px); }
@media (max-width: 700px) { .post-cover { aspect-ratio: 4 / 3; } }

/* Guide: innehåll + innehållsförteckning */
.post { display: grid; grid-template-columns: 220px minmax(0, var(--read)); gap: clamp(32px, 6vw, 96px); justify-content: center; padding-bottom: clamp(64px, 8vw, 112px); }
.toc { position: sticky; top: 104px; align-self: start; font-size: .85rem; }
.toc .caps { color: var(--muted); display: block; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; transition: color .2s, border-color .2s; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--ink); }
.toc-mobile { display: none; }
@media (max-width: 960px) {
  .post { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 36px; font-size: .92rem; }
  .toc-mobile summary { cursor: pointer; padding: 12px 0; font-weight: 500; }
  .toc-mobile ol { margin: 0 0 14px; padding-left: 1.2em; color: var(--muted); }
  .toc-mobile a { text-decoration: none; }
}

.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; }
.prose .ingress { font-size: 1.3rem; line-height: 1.6; font-weight: 300; margin-top: 0; }
.prose h2 { font-size: clamp(1.55rem, 2.6vw, 2rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.15rem; font-weight: 500; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.2em; margin-bottom: 0; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose li::marker { color: var(--faint); }
.prose strong { font-weight: 500; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--faint); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.5; margin-top: 1.6em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.prose td:first-child { font-weight: 500; }

/* "I korthet" */
.keys { background: var(--soft); border-radius: var(--radius); padding: 22px 26px; margin-top: 2em !important; }
.keys .caps { color: var(--muted); }
.keys ul { list-style: none; padding: 0; margin: 10px 0 0; }
.keys li { position: relative; padding-left: 26px; margin: .55em 0; }
.keys li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--ink); }

/* Vanliga frågor som dragspel */
.faq { margin-top: 1.4em !important; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--muted); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* Butiks-CTA */
.cta { background: var(--stone); color: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 3em !important; }
.cta h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 0; }
.cta p { margin: 8px 0 0; color: rgba(255,255,255,.65); }
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; border-radius: 999px; padding: 12px 24px; font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: opacity .2s; }
.cta .btn { background: #fff; color: var(--ink); }
.btn:hover { opacity: .85; }

/* Kort för guider */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.card { text-decoration: none; display: flex; flex-direction: column; gap: 16px; }
.card .cover { aspect-ratio: 4 / 3; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .cover { transform: scale(.985); }
.card h3 { font-size: 1.35rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card .post-meta { margin-top: 0; font-size: .8rem; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.card.featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; grid-column: 1 / -1; }
.card.featured .cover { aspect-ratio: 16 / 10; }
.card.featured h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 300; letter-spacing: -.03em; }
.card.featured p { font-size: 1.05rem; }
@media (max-width: 800px) { .card.featured { grid-template-columns: 1fr; } }

.related { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 96px) 0 clamp(72px, 9vw, 128px); }
.related h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 300; margin-bottom: 36px; }

/* Guideindex */
.index-head { padding: clamp(56px, 9vw, 128px) 0 clamp(40px, 5vw, 64px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.index-head h1 { font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.index-head p { max-width: 340px; color: var(--muted); margin: 0; }
.index-body { padding-bottom: clamp(72px, 9vw, 128px); }

/* Footer */
footer { background: var(--stone); color: #fff; padding: 64px 0 72px; }
.foot { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 32px; }
.foot .foot-h { font-size: .85rem; font-weight: 500; margin: 0 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.foot li { padding: 4px 0; color: rgba(255,255,255,.6); }
.foot a { text-decoration: none; }
.foot li a:hover { color: #fff; }
.foot-base { margin-top: 56px; font-size: .78rem; color: rgba(255,255,255,.66); }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card .cover, .faq summary::after { transition: none; }
}

/* Tillgänglighet och sidbyten */
@view-transition { navigation: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; font-size: .9rem; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid #4a8cff; outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

/* Modellsidor: skal per iPhone-modell */
.model-head { padding: clamp(40px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; }
.model-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 300; letter-spacing: -.03em; margin-top: 18px; }
.model-head p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 460px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.model-gallery { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: clamp(10px, 1.4vw, 18px); margin-bottom: clamp(48px, 6vw, 80px); }
.model-shot { margin: 0; }
.model-shot .tile { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); background: linear-gradient(180deg, #f7f7f5, #efefec); overflow: hidden; display: grid; place-items: center; }
.model-shot .tile::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 7%; height: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.18), transparent); }
.model-shot img { position: relative; z-index: 1; height: 82%; width: auto; max-width: 90%; object-fit: contain; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.model-shot:hover img { transform: translateY(-6px); }
.model-shot figcaption { padding-top: 10px; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.model-shot figcaption i { width: 12px; height: 12px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.model-shot .tile.empty { background: var(--soft); color: var(--muted); font-size: .85rem; text-align: center; padding: 20px; }
.model-shot .tile.empty::after { display: none; }
.model-shot .tile.empty b { display: block; width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
@media (max-width: 800px) { .model-head { grid-template-columns: 1fr; } .model-gallery { grid-template-columns: repeat(2, 1fr); } }
.specs-list { margin: 0; border-top: 1px solid var(--line); }
.specs-list div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.specs-list dt { color: var(--muted); }
.specs-list dd { margin: 0; }
@media (max-width: 600px) { .specs-list div { grid-template-columns: 1fr; gap: 2px; } }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.model-link { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.model-link:hover { border-color: var(--ink); }
.model-link img { width: 34px; height: 48px; object-fit: contain; }
.model-link span { display: grid; }
.model-link small { color: var(--muted); font-size: .78rem; }
.model-link .nopic { width: 34px; height: 48px; border-radius: 6px; background: var(--soft); }
.model-gallery.few { max-width: 620px; }
