/* ============ KOMPASS — modern, ljus design ============ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #101413;
  --ink-soft: #5a625f;
  --line: #e7eae8;
  --accent: #0d9268;
  --accent-2: #2dd4bf;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --font-display: "Sora", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 20, 19, 0.04), 0 8px 24px rgba(16, 20, 19, 0.06);
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1140px, 93%); margin-inline: auto; }
::selection { background: var(--accent); color: #fff; }

em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav__links { display: flex; align-items: center; gap: 16px; }
.nav__links a.is-cta {
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 9px 20px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s;
}
.nav__links a.is-cta:hover { background: var(--accent); }
.nav__user { color: var(--ink-soft); font-size: 0.92rem; }

/* ============ KNAPPAR ============ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn--primary:disabled { opacity: 0.6; cursor: wait; }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--full { width: 100%; }
.btn--small { padding: 8px 18px; font-size: 0.85rem; }
.btn--big { padding: 16px 36px; font-size: 1.02rem; }

/* ============ STARTSIDA ============ */
.hero { padding: 72px 0 40px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero__sub { margin-top: 22px; color: var(--ink-soft); font-size: 1.05rem; max-width: 54ch; }
.hero__actions { margin-top: 30px; }
.hero__points { margin-top: 28px; list-style: none; display: grid; gap: 10px; }
.hero__points li { padding-left: 28px; position: relative; color: var(--ink-soft); font-size: 0.95rem; }
.hero__points li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 28px; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.93rem; }

.section { padding: 60px 0 90px; }

/* ============ AUTH ============ */
.auth { padding: 30px; }
.auth__tabs { display: flex; gap: 6px; margin-bottom: 22px; background: var(--bg); border-radius: 999px; padding: 5px; }
.auth__tab {
  flex: 1;
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.auth__tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.auth__error { color: #c2410c; font-size: 0.9rem; margin-bottom: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* ============ APP-LAYOUT ============ */
.app {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 36px;
  padding: 40px 0 90px;
  align-items: start;
}
.app__sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
.planlist { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.planlist__item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s;
}
.planlist__item:hover { border-color: var(--accent); }
.planlist__item.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.planlist__item time { color: var(--ink-soft); font-size: 0.75rem; }

.app__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.app__lead { margin-top: 10px; color: var(--ink-soft); max-width: 65ch; }

/* ============ FORMULÄR ============ */
.planform { margin-top: 26px; padding: 30px; }
.planform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.field--wide { grid-column: 1 / -1; }

/* ============ LADDNING ============ */
.loading { text-align: center; padding: 110px 0; }
.loading__compass { animation: spin 2.4s ease-in-out infinite; color: var(--ink); }
@keyframes spin {
  0% { transform: rotate(0); }
  50% { transform: rotate(200deg); }
  100% { transform: rotate(360deg); }
}
.loading h2 { font-family: var(--font-display); font-weight: 600; margin-top: 18px; }
.loading p { color: var(--ink-soft); margin-top: 8px; min-height: 1.6em; }

/* ============ PLANVY ============ */
.plan__head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.progress { display: flex; align-items: center; gap: 16px; margin: 26px 0 30px; }
.progress__bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  transition: width 0.4s ease;
}
.progress__label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }

.psec { padding: 26px 28px; margin-bottom: 18px; }
.psec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.psec__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.015em; }
.psec__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}
.psec__desc { color: var(--ink-soft); font-size: 0.92rem; margin-top: 6px; }

.checklist { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.check label {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.check label:hover { border-color: var(--accent); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  flex: 0 0 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--line);
  border-radius: 7px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.check.is-done .check__box { background: var(--accent); border-color: var(--accent); }
.check.is-done .check__box::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}
.check__body { display: grid; gap: 3px; }
.check__text { font-weight: 600; font-size: 0.95rem; }
.check.is-done .check__text { text-decoration: line-through; color: var(--ink-soft); }
.check__detail { color: var(--ink-soft); font-size: 0.88rem; }
.check__time {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 3px;
}

/* ============ UPPFÖLJNING ============ */
.plan__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.followup { padding: 26px 28px; margin: 0 0 22px; border-left: 4px solid var(--accent); }
.followup__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.followup__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.followup__head time { color: var(--ink-soft); font-size: 0.82rem; }
.followup__summary { margin-top: 10px; }
.followup__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.followup__col { border-radius: 12px; padding: 16px 18px; }
.followup__col h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.followup__col ul { padding-left: 18px; display: grid; gap: 6px; font-size: 0.92rem; }
.followup__col--good { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.followup__col--good h3 { color: var(--accent); }
.followup__col--stuck { background: rgba(234, 121, 22, 0.08); }
.followup__col--stuck h3 { color: #c2620c; }
.followup__subhead { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 20px 0 10px; }
.followup__adjust { list-style: none; display: grid; gap: 10px; }
.followup__adjust li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.followup__adjust strong { display: block; font-size: 0.95rem; }
.followup__adjust span { color: var(--ink-soft); font-size: 0.88rem; }
.followup__focus {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
}

/* ============ PDF-EXPORT (print) ============ */
@media print {
  .nav, .app__sidebar, .plan__actions, .footer { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .app { display: block; padding: 0; }
  .card, .psec, .followup { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .psec { margin-bottom: 12px; padding: 16px 18px; }
  .progress__bar span { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .check label { padding: 8px 10px; border: 0; border-bottom: 1px solid #eee; border-radius: 0; }
  .check__box { border-color: #999; }
  .check.is-done .check__box { background: #333 !important; border-color: #333 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .followup__focus { background: #f3f3f3; color: #111; }
  a { text-decoration: none; color: inherit; }
}

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); padding: 36px 0; background: var(--surface); }
.footer__inner { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.footer__logo { font-family: var(--font-display); font-weight: 700; }
.footer__note { color: var(--ink-soft); font-size: 0.88rem; }

/* ============ RESPONSIVT ============ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .app__sidebar { position: static; display: grid; gap: 10px; }
  .planlist { display: flex; overflow-x: auto; padding-bottom: 6px; }
  .planlist__item { min-width: 180px; }
  .planform__grid { grid-template-columns: 1fr; }
  .plan__head { flex-direction: column; }
  .followup__cols { grid-template-columns: 1fr; }
}
