/* Time Planner & Manager — hikingtiges.digital
   assets/css/app.css */

/* ---------- tokens ---------- */
:root {
  --paper:        #FFFAF4;
  --surface:      #FFFFFF;
  --surface-2:    #F7EFE4;
  --cream:        #F6E6C6;
  --ink:          #1E1408;
  --ink-2:        #574734;
  --ink-3:        #7A6B58;
  --line:         #EBDCC7;
  --line-2:       #DCC8AC;
  --accent:       #F5811F;
  --accent-deep:  #A34C00;
  --accent-soft:  #FDE7CE;
  --shadow-1: 0 1px 2px rgba(60, 38, 12, .06), 0 6px 18px rgba(60, 38, 12, .05);
  --shadow-2: 0 2px 4px rgba(60, 38, 12, .08), 0 14px 34px rgba(60, 38, 12, .09);

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 320ms;

  --maxw: 1240px;
  --gut: clamp(18px, 4vw, 44px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper:        #17110A;
  --surface:      #1F1710;
  --surface-2:    #261C13;
  --cream:        #2E2317;
  --ink:          #F8EEE1;
  --ink-2:        #C0AF9A;
  --ink-3:        #9A8A76;
  --line:         #35291D;
  --line-2:       #473726;
  --accent:       #FF9838;
  --accent-deep:  #FFBE7C;
  --accent-soft:  #3A2A15;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .45), 0 18px 40px rgba(0, 0, 0, .38);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  margin: 0;
  line-height: 1.06;
  letter-spacing: -.022em;
  font-weight: 700;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.3rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -.026em; }
h3 { font-size: 1.18rem; line-height: 1.25; }
p  { margin: 0; }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

img { max-width: 100%; display: block; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px;
  z-index: 100;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 10px 16px; border-radius: var(--r-s);
  transition: top 160ms var(--ease);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.lede { max-width: 62ch; font-size: 1.075rem; color: var(--ink-2); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.nav[data-stuck="true"] { border-bottom-color: var(--line); }
.nav__in {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em;
}
.brand svg { flex: none; }
.brand { white-space: nowrap; }
.only-mobile { display: none; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a {
  color: var(--ink-2); text-decoration: none; font-size: .95rem;
  position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--accent); transform: scaleX(0);
  transform-origin: left; transition: transform 220ms var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__side { display: flex; align-items: center; gap: 10px; margin-left: 8px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink-2); cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface); }
.burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: .95rem; font-weight: 500;
  padding: 12px 18px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease),
              background 200ms var(--ease), border-color 200ms var(--ease);
}
.btn--play {
  background: var(--accent); color: #1E1408;
  box-shadow: var(--shadow-1);
  font-weight: 600;
}
.btn--play:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); color: #1E1408; }
.btn--play:active { transform: translateY(0); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn--sm { padding: 9px 14px; font-size: .875rem; border-radius: 10px; }
.btn__sub { display: block; font-size: .72rem; opacity: .75; font-weight: 500; line-height: 1.1; }
.btn__main { display: block; line-height: 1.15; }

/* ---------- sections ---------- */
section { padding-block: clamp(64px, 9vw, 118px); }
.sec-head { max-width: 58ch; margin-bottom: clamp(30px, 4vw, 52px); }
.sec-head p { margin-top: 16px; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(48px, 6vw, 96px); }
.hero__grid {
  display: grid; gap: clamp(34px, 5vw, 66px);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5.6fr);
  align-items: start;
}
.hero__copy { padding-top: clamp(0px, 2vw, 26px); }
.hero h1 { max-width: 15ch; }
.hero__lede { margin-top: 22px; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.hero__facts {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 26px;
  font-size: .875rem; color: var(--ink-3);
}
.hero__facts b { color: var(--ink); font-weight: 600; }

/* ---------- day prototype ---------- */
.day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.day__top {
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}
.day__date {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.day__date h2 {
  font-size: 1.16rem; letter-spacing: -.01em;
}
.day__budget { font-size: .84rem; color: var(--ink-3); }

.scale { margin-top: 15px; }
.scale__track {
  position: relative; height: 44px; border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden; cursor: crosshair;
}
:root[data-theme="dark"] .scale__track { background: #191309; }
.scale__fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #B4560A));
  width: 0%;
  transition: width 620ms var(--ease);
}
.scale__ticks { position: absolute; inset: 0; display: flex; }
.scale__tick { flex: 1; border-right: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); }
.scale__tick:last-child { border-right: 0; }
.scale__hover {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--ink); opacity: 0; pointer-events: none;
  transition: opacity 160ms var(--ease);
}
.scale__hover[data-on="true"] { opacity: .55; }
.scale__hourlabel {
  position: absolute; top: 6px; transform: translateX(-50%);
  font-size: .72rem; padding: 2px 6px; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity 160ms var(--ease);
}
.scale__hourlabel[data-on="true"] { opacity: 1; }
.scale__legend {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: .76rem; color: var(--ink-3);
}
.remaining { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.remaining__val {
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: 2.15rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.03em; line-height: 1;
}
.remaining__lab { font-size: .86rem; color: var(--ink-3); }
.remaining__val[data-low="true"] { color: var(--accent-deep); }

.tasks { list-style: none; margin: 0; padding: 10px 12px 4px; display: grid; gap: 6px; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; text-align: left; width: 100%;
  font: inherit; color: var(--ink);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease),
              border-color 200ms var(--ease), background 200ms var(--ease);
}
.task:hover { transform: translate(3px, -2px); box-shadow: var(--shadow-1); border-color: var(--line-2); }
.task[data-new="true"] { animation: taskIn 460ms var(--ease) both; }
.task[data-done="true"] { background: var(--surface-2); color: var(--ink-3); }
.task[data-done="true"] .task__name { text-decoration: line-through; text-decoration-color: var(--line-2); }
.task__box {
  width: 19px; height: 19px; flex: none; border-radius: 5px;
  border: 1.5px solid var(--line-2); display: grid; place-items: center;
  transition: background 200ms var(--ease), border-color 200ms var(--ease);
}
.task[data-done="true"] .task__box { background: var(--accent); border-color: var(--accent); }
.task__box svg { opacity: 0; transition: opacity 160ms var(--ease); }
.task[data-done="true"] .task__box svg { opacity: 1; }
.task__name { flex: 1; font-size: .96rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__dur {
  font-size: .88rem; color: var(--accent-deep); font-weight: 600;
  background: var(--accent-soft); padding: 3px 9px; border-radius: 7px;
}
.task[data-done="true"] .task__dur { background: transparent; color: var(--ink-3); }

.day__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 16px; border-top: 1px solid var(--line);
  margin-top: 8px;
}
.day__hint { font-size: .78rem; color: var(--ink-3); margin-left: auto; }
.linkish {
  background: none; border: 0; font: inherit; font-size: .84rem;
  color: var(--ink-3); cursor: pointer; padding: 6px 4px;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--ink); }

@keyframes taskIn {
  from { opacity: 0; transform: translateY(-8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ---------- problem ---------- */
.problem { background: var(--surface-2); border-block: 1px solid var(--line); }
.problem__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.problem p + p { margin-top: 18px; }
.compare { display: grid; gap: 14px; }
.compare__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 16px 18px;
}
.compare__card h3 { font-size: .98rem; margin-bottom: 12px; }
.compare__rows { display: grid; gap: 7px; font-size: .9rem; }
.compare__row { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.compare__row span:last-child { color: var(--ink-3); }
.compare__card--budget .compare__row span:last-child { color: var(--accent-deep); font-weight: 600; }
.compare__sum {
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-2);
  display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink);
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 30px); counter-reset: s; }
.step { position: relative; padding-top: 22px; border-top: 2px solid var(--line); }
.step__n {
  font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 700;
  font-size: .9rem; color: var(--accent-deep);
  position: absolute; top: -1px; left: 0;
  background: var(--paper); padding-right: 10px; transform: translateY(-60%);
}
.step h3 { margin-bottom: 10px; }
.step p { font-size: .96rem; }
.step__vis {
  margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); padding: 14px; box-shadow: var(--shadow-1);
}

/* ---------- bento ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
}
.cell {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 200ms var(--ease);
}
.cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); border-color: var(--line-2); }
.cell p { font-size: .95rem; }
.cell--wide { grid-column: span 2; grid-row: span 2; background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.cell--tall { grid-row: span 2; }
.cell__spacer { flex: 1; }
.hours {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; margin-top: 8px;
}
.hours span {
  height: 34px; border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--line);
}
.hours span[data-used="true"] { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.hours span[data-used="soft"] { background: var(--accent-soft); border-color: var(--accent-soft); }
.cell__stat {
  font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--ink); letter-spacing: -.03em; line-height: 1;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.chip {
  font-size: .82rem; padding: 6px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.chip[data-accent="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); font-weight: 600; }

/* ---------- gallery ---------- */
.shots {
  display: grid; gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.shot { margin: 0; }
.shot__frame {
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface-2); overflow: hidden;
  aspect-ratio: 197 / 296; display: grid; place-items: center;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}
.shot:hover .shot__frame { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.shot__frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 10px; font-size: .82rem; color: var(--ink-3); }

/* ---------- download ---------- */
.download { background: var(--surface-2); border-block: 1px solid var(--line); }
.download__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.pkg {
  margin-top: 20px; font-size: .88rem; color: var(--ink-2);
  display: grid; gap: 8px;
}
.pkg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface); border: 1px solid var(--line);
  padding: 3px 7px; border-radius: 6px; font-size: .85em; color: var(--ink);
}
.appcard {
  display: flex; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 20px; box-shadow: var(--shadow-1);
}
.appcard img { width: 76px; height: 76px; border-radius: 18px; flex: none; }
.appcard h3 { font-size: 1.1rem; }
.appcard p { font-size: .88rem; color: var(--ink-3); margin-top: 6px; }

/* ---------- developer ---------- */
.dev { border-bottom: 1px solid var(--line); }
.dev__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; align-items: start;
}
.dev__item h3 { font-size: .82rem; color: var(--ink-3); font-family: Inter, sans-serif; font-weight: 500; letter-spacing: 0; margin-bottom: 8px; }
.dev__item p, .dev__item a { font-size: .98rem; color: var(--ink); }

/* ---------- footer ---------- */
.foot { padding-block: 34px 44px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; font-size: .88rem; color: var(--ink-3); }
.foot__links { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.foot__links a { color: var(--ink-2); text-decoration: none; }
.foot__links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- legal / simple pages ---------- */
.page { padding-top: clamp(46px, 6vw, 76px); }
.page__head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
.page__meta { margin-top: 12px; font-size: .86rem; color: var(--ink-3); }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.45rem; margin-top: 40px; margin-bottom: 12px; }
.prose h3 { font-size: 1.05rem; margin-top: 24px; margin-bottom: 8px; }
.prose p, .prose li { font-size: 1rem; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.card-note {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--r-m);
  padding: 16px 18px; margin-top: 22px; font-size: .95rem;
}
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 60px); align-items: start; }
.mailbox {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 26px; box-shadow: var(--shadow-1);
}
.mailbox dt { font-size: .8rem; color: var(--ink-3); margin-top: 16px; }
.mailbox dt:first-of-type { margin-top: 0; }
.mailbox dd { margin: 4px 0 0; color: var(--ink); font-size: .98rem; }
.err { text-align: left; padding-block: clamp(70px, 12vw, 140px); }
.err__code {
  font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 800;
  font-size: clamp(4rem, 15vw, 9rem); line-height: .9; letter-spacing: -.05em;
  color: var(--accent); margin-bottom: 20px;
}

/* ---------- reveal ---------- */
:root.js .rv { opacity: 0; transform: translateY(16px); }
:root.js .rv[data-shown="true"] { opacity: 1; transform: none; transition: opacity 520ms var(--ease), transform 520ms var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .problem__grid, .download__grid, .contact__grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--wide { grid-column: span 2; grid-row: span 1; }
  .cell--tall { grid-row: span 1; }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .dev__grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 22px; margin: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  }
  .nav__links[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__links a::after { display: none; }
  .burger { display: grid; }
  .only-mobile { display: block; }
  .nav__side .btn--play { display: none; }
  .nav__links .only-mobile { color: var(--accent-deep); font-weight: 600; border-bottom: 0; }
  .nav__side { margin-left: auto; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: 1fr; }
  .cell--wide { grid-column: span 1; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .day__hint { display: none; }
  .scale__track { height: 38px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  :root.js .rv { opacity: 1; transform: none; }
  .task:hover, .cell:hover, .btn--play:hover, .btn--ghost:hover,
  .shot:hover .shot__frame { transform: none; }
}
/* ---------- Cookie bar (full-width, Norwegian-style) + toggle modal ---------- */
.cmp-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 990;
  background: var(--surface);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -8px 28px rgba(30, 20, 8, .12);
  max-height: 70vh;
  overflow-y: auto;
}
.cmp-bar[hidden],
.cmp-modal-overlay[hidden] { display: none !important; }

.cmp-bar__in {
  display: grid;
  gap: 16px;
  padding: 18px 0 20px;
}
@media (min-width: 52rem) {
  .cmp-bar__in {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 32px;
  }
  .cmp-bar__title { grid-column: 1; }
  .cmp-bar__text p { grid-column: 1; }
  .cmp-bar__actions { grid-column: 2; grid-row: 1 / span 2; }
}
.cmp-bar__title {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.cmp-bar__text p {
  margin: 0;
  max-width: 54ch;
  font-size: .9rem;
  color: var(--ink-2);
}
.cmp-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cmp-link-btn {
  background: none; border: none; font: inherit; font-size: .84rem;
  color: var(--ink-3); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; padding: 4px 0;
}
.cmp-link-btn:hover { color: var(--ink); }

/* Modal */
.cmp-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 8, 5, 0.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: cmpFadeIn 250ms var(--ease) both;
}

.cmp-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-2);
  width: 100%; max-width: 520px;
  max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden;
}

.cmp-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.cmp-modal__head h2 { font-size: 1.25rem; }

.cmp-modal__body { padding: 20px 24px; overflow-y: auto; }
.cmp-modal__desc { font-size: .88rem; color: var(--ink-2); margin-bottom: 20px; }

.cmp-options { display: grid; gap: 16px; }
.cmp-option {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 14px; border-radius: var(--r-m); background: var(--surface-2);
  border: 1px solid var(--line);
}
.cmp-option__info h4 { font-size: .92rem; margin-bottom: 4px; }
.cmp-option__info p { font-size: .8rem; color: var(--ink-3); line-height: 1.4; }

.cmp-modal__foot {
  padding: 16px 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px; background: var(--paper);
}

/* Switches */
.cmp-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; margin-top: 2px; }
.cmp-switch input { opacity: 0; width: 0; height: 0; }
.cmp-switch__slider {
  position: absolute; inset: 0; cursor: pointer;
  background-color: var(--line-2); border-radius: 20px;
  transition: 200ms var(--ease);
}
.cmp-switch__slider::before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background-color: var(--paper);
  border-radius: 50%; transition: 200ms var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cmp-switch input:checked + .cmp-switch__slider { background-color: var(--accent); }
.cmp-switch input:checked + .cmp-switch__slider::before { transform: translateX(20px); }
.cmp-switch input:disabled + .cmp-switch__slider { opacity: 0.6; cursor: not-allowed; }

@keyframes cmpSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cmpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 600px) {
  .cmp-bar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cmp-bar__actions .btn { justify-content: center; }
  .cmp-bar__actions .cmp-link-btn { grid-column: 1 / -1; text-align: center; }
  .cmp-modal__foot { flex-direction: column-reverse; }
  .cmp-modal__foot .btn { width: 100%; justify-content: center; }
}