  :root {
    --cream: #faf7f2;
    --warm-white: #fff9f4;
    --sand: #e8e0d4;
    --terracotta: #c4714a;
    --terracotta-light: #d4876a;
    --terracotta-dark: #a85a35;
    --forest: #3d5a47;
    --forest-light: #527a5f;
    --text-dark: #2a2118;
    --text-mid: #5a4e42;
    --text-light: #8a7d70;
    --border: #d8cfc4;
    --shadow: rgba(60, 40, 20, 0.08);
    --shadow-md: rgba(60, 40, 20, 0.14);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
  }
  .site-header {
    background: var(--forest);
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  }
  .site-header .logo {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #e8f0eb;
  }
  .site-header .logo span { color: #a8c9b0; font-style: italic; }
  .header-left { display: flex; align-items: center; gap: 1rem; }
  .logo { cursor: pointer; transition: opacity 0.18s; }
  .logo:hover { opacity: 0.8; }
  .btn-whats-new {
    font-size: 0.73rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(168, 201, 176, 0.45);
    background: transparent;
    color: #a8c9b0;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.18s;
  }
  .btn-whats-new:hover { background: rgba(168, 201, 176, 0.15); border-color: #a8c9b0; }
  .whats-new-box { max-width: 580px; max-height: 80vh; display: flex; flex-direction: column; }
  .whats-new-content {
    overflow-y: auto;
    flex: 1;
    margin: 1rem 0;
    padding-right: 0.5rem;
    line-height: 1.65;
    font-size: 0.9rem;
    color: var(--text-mid);
  }
  .whats-new-content h2 { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 400; color: var(--text-dark); margin: 1.25rem 0 0.5rem; border-bottom: 1px solid var(--sand); padding-bottom: 0.3rem; }
  .whats-new-content h2:first-child { margin-top: 0; }
  .whats-new-content h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); margin: 0.9rem 0 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .whats-new-content h4 { font-size: 0.85rem; font-weight: 500; color: var(--text-mid); margin: 0.75rem 0 0.25rem; }
  .whats-new-content ul { padding-left: 1.2rem; margin: 0.3rem 0; }
  .whats-new-content li { margin-bottom: 0.25rem; }
  .whats-new-content hr { border: none; border-top: 1px solid var(--sand); margin: 1rem 0; }
  .whats-new-content strong { font-weight: 600; color: var(--text-dark); }
  .whats-new-content code { font-family: monospace; background: var(--cream); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.85em; }
  .whats-new-content p { margin-bottom: 0.5rem; }
  .header-tag {
    font-size: 0.75rem;
    color: #a8c9b0;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .main-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
  }
  .site-footer {
    display: flex;
    justify-content: center;
    padding: 0 1.5rem 2rem;
  }
  .btn-privacy-policy {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.18s;
  }
  .btn-privacy-policy:hover {
    background: var(--warm-white);
    border-color: var(--text-light);
    color: var(--text-dark);
  }
  .page-intro { margin-bottom: 2.5rem; }
  .page-intro h1 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }
  .page-intro p { color: var(--text-mid); font-size: 0.95rem; font-weight: 300; }
  .steps {
    display: flex;
    gap: 0;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
    box-shadow: 0 2px 8px var(--shadow);
  }
  .step {
    flex: 1;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-light);
    border-right: 1px solid var(--border);
    transition: background 0.2s;
  }
  .step:last-child { border-right: none; }
  .step.active { background: var(--warm-white); color: var(--terracotta); font-weight: 500; }
  .step.done { background: #f0f5f1; color: var(--forest); }
  .step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--border);
    color: var(--text-mid);
    flex-shrink: 0;
  }
  .step.active .step-num { background: var(--terracotta); color: white; }
  .step.done .step-num { background: var(--forest); color: white; }
  .card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
  }
  .card-title {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--sand);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .card-title .icon {
    width: 28px; height: 28px;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
  }
  .field-group { display: flex; flex-direction: column; gap: 0.4rem; }
  .field-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-mid);
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
  .field-label .required { color: var(--terracotta); margin-left: 2px; }
  select, input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: var(--text-dark);
    background: var(--warm-white);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    appearance: none;
  }
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7d70' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
    cursor: pointer;
  }
  select:focus, input:focus, textarea:focus {
    border-color: var(--terracotta-light);
    box-shadow: 0 0 0 3px rgba(196, 113, 74, 0.12);
    background: white;
  }
  textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
  .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  @media (max-width: 580px) { .form-grid-2 { grid-template-columns: 1fr; } }
  @media (max-width: 560px) { .header-tag { display: none; } }
  .form-grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
  .form-section { margin-bottom: 1.5rem; }
  .form-section:last-child { margin-bottom: 0; }
  .hint { font-size: 0.78rem; color: var(--text-light); margin-top: 0.25rem; font-style: italic; }
  .btn-row { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
  .btn {
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.18s;
  }
  .btn-primary { background: var(--terracotta); color: white; box-shadow: 0 2px 8px rgba(196,113,74,0.3); }
  .btn-primary:hover { background: var(--terracotta-dark); box-shadow: 0 4px 14px rgba(196,113,74,0.4); transform: translateY(-1px); }
  .btn-secondary { background: white; color: var(--forest); border: 1.5px solid var(--forest); }
  .btn-secondary:hover { background: #f0f5f1; transform: translateY(-1px); }
  .btn-ghost { background: transparent; color: var(--text-mid); border: 1.5px solid var(--border); }
  .btn-ghost:hover { background: var(--sand); color: var(--text-dark); }
  .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
  .screen { display: none; }
  .screen.active { display: block; }
  .csv-upload-label {
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: var(--forest);
    border: 1.5px solid var(--forest);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.18s;
  }
  .csv-upload-label:hover { background: #f0f5f1; transform: translateY(-1px); }
  #csvUploadInput { display: none; }
  .toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--forest);
    color: white;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .toast.show { transform: translateY(0); opacity: 1; }
  .specialty-filter {
    width: 100%;
    max-width: 260px;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    background: white;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 0.5rem;
  }
  .specialty-filter:focus {
    border-color: var(--terracotta-light);
    box-shadow: 0 0 0 3px rgba(196, 113, 74, 0.1);
  }
  .specialty-filter::placeholder {
    color: var(--text-light);
  }
  .specialty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
  .specialty-btn {
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--warm-white);
    color: var(--text-dark);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .specialty-btn:hover { border-color: var(--terracotta-light); background: white; box-shadow: 0 2px 8px var(--shadow); }
  .specialty-btn.selected { border-color: var(--terracotta); background: #fff4ef; color: var(--terracotta-dark); font-weight: 500; }
  .specialty-btn.coming-soon { opacity: 0.5; cursor: default; }
  .specialty-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
  .specialty-btn.selected .dot { background: var(--terracotta); }
  .blankett-option {
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--warm-white);
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }
  .blankett-option:hover { border-color: var(--terracotta-light); background: white; box-shadow: 0 2px 10px var(--shadow); }
  .blankett-option.selected { border-color: var(--terracotta); background: #fff4ef; }
  .blankett-option .bicon {
    width: 36px; height: 36px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .blankett-option .binfo h4 { font-size: 0.92rem; font-weight: 500; margin-bottom: 0.2rem; }
  .blankett-option .binfo p { font-size: 0.8rem; color: var(--text-light); }
  .blankett-option.disabled { opacity: 0.45; cursor: default; }
  .delmål-section-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-mid);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    margin-top: 0.75rem;
  }
  .delmål-section-label:first-child { margin-top: 0; }
  .exempelplacering-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: var(--text-dark);
    background: var(--warm-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7d70' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
    appearance: none;
    margin-bottom: 0.75rem;
  }
  .exempelplacering-select:focus { border-color: var(--terracotta-light); box-shadow: 0 0 0 3px rgba(196,113,74,0.12); background-color: white; }
  .delmål-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    margin-bottom: 0.75rem;
  }
  .delmål-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    background: var(--warm-white);
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
  }
  .delmål-item:hover { border-color: var(--terracotta-light); background: white; }
  .delmål-item.checked { border-color: var(--terracotta); background: #fff4ef; color: var(--terracotta-dark); }
  .delmål-item.kan-uppfylla-check { border-color: #d4960a; background: #fffbec; color: #7a5800; }
  .delmål-item.kan-uppfylla-check input[type="checkbox"] { accent-color: #d4960a; }
  .delmål-item input[type="checkbox"] { cursor: pointer; accent-color: var(--terracotta); margin: 0; }
  .delmål-info-btn {
    font-size: 0.68rem;
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: 0.2rem;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    flex-shrink: 0;
  }
  .delmål-item:hover .delmål-info-btn { opacity: 1; }
  @media (hover: none) { .delmål-info-btn { opacity: 0.55; } }
  .delmål-desc-panel {
    display: none;
    font-size: 0.82rem;
    color: var(--text-mid);
    background: var(--cream);
    border: 1px solid var(--border);
    border-left: 3px solid var(--terracotta-light);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.6rem;
    line-height: 1.55;
  }
  .delmål-desc-panel.visible { display: block; animation: dmFadeIn 0.12s ease; }
  .delmål-desc-panel strong { color: var(--text-dark); font-weight: 500; }
  @keyframes dmFadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
  .delmål-result {
    font-size: 0.82rem;
    color: var(--text-light);
    font-style: italic;
    padding: 0.4rem 0.7rem;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 2rem;
    word-break: break-all;
  }
  /* ── Date picker ─────────────────────────────────────────────────────────── */
  .date-input-wrapper { display: flex; align-items: center; gap: 0.5rem; flex: 1; position: relative; min-width: 0; }
  .date-input-wrapper input[type="text"] { min-width: 78px; }
  .cal-btn-wrapper { position: relative; flex-shrink: 0; display: inline-flex; }
  .date-picker-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .calendar-btn {
    flex-shrink: 0; padding: 0.62rem 0.7rem;
    border: 1.5px solid var(--border); border-radius: 10px;
    background: var(--warm-white); cursor: pointer; font-size: 1rem;
    transition: border-color 0.15s, background 0.15s; line-height: 1;
    font-family: inherit;
  }
  .calendar-btn:hover { border-color: var(--terracotta-light); background: white; }
  /* ── Period row ──────────────────────────────────────────────────────────── */
  .period-row { display: flex; align-items: flex-end; gap: 0.6rem; margin-top: 0.75rem; }
  .period-sep { color: var(--text-light); font-size: 1.1rem; padding-bottom: 0.65rem; flex-shrink: 0; }
  .sub-label { font-size: 0.78rem; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.3rem; }
  /* ── Inline validation error ─────────────────────────────────────────────── */
  .field-error { font-size: 0.78rem; color: var(--terracotta-dark); margin-top: 0.3rem; display: none; }
  .field-error.show { display: block; }
  /* ── Modal ───────────────────────────────────────────────────────────────── */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.38); z-index: 1000;
    display: none; align-items: center; justify-content: center;
  }
  .modal-overlay.show { display: flex; }
  .modal-box {
    background: white; border-radius: 16px; padding: 2rem; max-width: 440px;
    width: 90%; box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  }
  .modal-box h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 400; margin-bottom: 0.6rem; color: var(--text-dark); }
  .modal-box p { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 1.5rem; line-height: 1.55; white-space: pre-wrap; }
  .modal-btns { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }
  @media print { .placering-tid { display: none; } }
  input.field-readonly { background: #f5f5f5; color: var(--text-light); cursor: default; border-style: dashed; user-select: none; }

.whats-new-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.whats-new-tab {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  color: var(--text-mid);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.whats-new-tab.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

#contact-overlay .modal-box {
  max-height: 88vh;
  overflow-y: auto;
}

#contact-overlay .modal-btns {
  margin-top: 0.25rem;
}

.contact-feedback {
  min-height: 1.5rem;
  font-size: 0.85rem;
  margin-top: -0.1rem;
}

.contact-feedback.success {
  color: var(--forest);
}

.contact-feedback.error {
  color: var(--terracotta-dark);
}


.h-captcha {
  margin: 0.25rem 0;
}
