/* Wise Stöðumat — svarendaviðmót
   Ljóst, hreint og faglegt. Wise brand-litir sem CSS custom properties. */

:root {
  --orange: #FF592D;
  --orange-dark: #E64A20;
  --orange-tint: #FFF6F2;
  --dark: #0F172A;
  --teal: #1D7C8B;
  --green-bg: #95FCDF;
  --gray: #64748B;
  --light-bg: #F4F4F4;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --band-low: #C2410C;
  --band-mid: #B45309;
  --band-high: #15803D;
  --error: #B91C1C;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.06);
  --font: 'Segoe UI', Calibri, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--light-bg);
  color: var(--dark);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- haus/fótur */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

.logo {
  height: 32px;
  width: auto;
  display: block;
}

.app-footer {
  margin-top: auto;
  text-align: center;
  color: var(--gray);
  font-size: 0.8rem;
  padding: 24px 16px;
}

.app-footer p { margin: 0; }

/* ---------------------------------------------------------------- síðugrind */
.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

body.results-mode .page { max-width: 900px; }

.screen[hidden] { display: none; }

h1 {
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

p { margin: 0 0 14px; }

.muted { color: var(--gray); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0 8px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

/* ---------------------------------------------------------------- hleðsla */
.screen-loading { text-align: center; padding-top: 48px; }

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: ws-spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes ws-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- forsíða */
.intro-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
}

.intro-list li {
  position: relative;
  padding: 5px 0 5px 30px;
}

.intro-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy {
  font-size: 0.85rem;
  color: var(--gray);
  background: var(--light-bg);
  border-left: 3px solid var(--teal);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 18px 0;
}

.notice {
  background: var(--orange-tint);
  border: 1px solid var(--orange);
  color: #9A3412;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 0 16px;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- hnappar */
.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-large { padding: 14px 32px; }

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--orange-dark); }

.btn-primary:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--dark);
  border-color: var(--border);
}

.btn-secondary:hover { border-color: var(--gray); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover { border-color: #fff; }

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
}

.btn-link:hover { color: var(--dark); }

/* ---------------------------------------------------------------- skráningarform */
.form-field {
  display: block;
  margin-bottom: 18px;
}

.form-field > span {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.req { color: var(--orange); font-style: normal; }

.optional { color: var(--gray); font-weight: 400; font-size: 0.8rem; }

input[type='text'],
input[type='email'] {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--dark);
  background: var(--card);
}

input[type='text']:focus,
input[type='email']:focus {
  outline: none;
  border-color: var(--teal);
}

.field-error {
  color: var(--error);
  font-size: 0.88rem;
  margin: 10px 0;
}

/* ---------------------------------------------------------------- könnun */
.survey-top { margin-bottom: 20px; }

.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 6px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.question-text {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 14px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px 12px 44px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.option-card::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  background: var(--card);
}

.option-card:hover { border-color: #94A3B8; }

.option-card.selected {
  border-color: var(--orange);
  background: var(--orange-tint);
}

.option-card.selected::before {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: inset 0 0 0 3px #fff;
}

.option-card:focus-visible {
  outline: 3px solid rgba(29, 124, 139, 0.4);
  outline-offset: 1px;
}

.final-card p:last-child { margin-bottom: 0; }

.survey-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.survey-nav .btn { min-width: 130px; }

.survey-nav #btn-back[hidden] { display: none; }

.survey-nav #btn-next { margin-left: auto; }

.save-status {
  min-height: 1.3em;
  font-size: 0.8rem;
  color: var(--gray);
  text-align: right;
  margin: 8px 0 0;
}

/* ---------------------------------------------------------------- niðurstöður */
.retake-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.results-head { padding: 32px 36px; }

.score-big {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.score-big .of {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray);
}

.level-name {
  font-size: 1.45rem;
  margin: 12px 0 6px;
}

.level-desc {
  color: var(--gray);
  margin: 0;
  max-width: 640px;
}

.hint-banner {
  background: rgba(149, 252, 223, 0.35);
  border: 1px solid var(--teal);
  color: var(--dark);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 20px;
  font-size: 0.92rem;
}

.results-section { margin-top: 24px; }

.section-title {
  font-size: 1.2rem;
  margin: 0 0 16px;
}

.cats-title { margin-top: 8px; }

.radar-card { text-align: center; }

.radar-card .section-title { text-align: left; }

.radar-svg {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  display: inline-block;
  width: 20px;
  height: 11px;
  border-radius: 3px;
}

.sw-own {
  background: rgba(255, 89, 45, 0.25);
  border: 2px solid var(--orange);
}

.sw-company {
  width: 22px;
  height: 0;
  border-radius: 0;
  border-top: 3px dashed var(--teal);
}

.cat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin-bottom: 14px;
}

.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.cat-head h3 {
  font-size: 1.08rem;
  margin: 0;
}

.score-chip {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 4px 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-text { margin: 0 0 4px; }

.next-step { margin: 10px 0 0; }

.next-step strong { color: var(--teal); }

.spread-note {
  font-style: italic;
  color: var(--gray);
  font-size: 0.88rem;
  margin: 10px 0 0;
}

.cat-skipped {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  color: var(--gray);
}

.cat-skipped-name { font-weight: 600; }

.skip-tag {
  font-size: 0.8rem;
  background: var(--light-bg);
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

.cta-block {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 28px;
}

.cta-text {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- farsímar */
@media (max-width: 640px) {
  .page { padding: 20px 14px 40px; }

  .card,
  .results-head { padding: 20px 18px; }

  .question-card { padding: 16px 16px; }

  .cat-card { padding: 18px 18px; }

  .cat-skipped { padding: 13px 18px; }

  .cta-block { padding: 22px 20px; }

  h1 { font-size: 1.4rem; }

  .score-big { font-size: 2.6rem; }

  .survey-nav .btn {
    min-width: 0;
    flex: 1;
  }

  .cta-actions .btn { flex: 1; }
}

/* ---------------------------------------------------------------- prentun */
@media print {
  .no-print,
  .app-footer,
  .retake-bar,
  .cta-actions,
  .survey-nav,
  .save-status { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11px;
    line-height: 1.4;
    display: block;
  }

  .app-header { border-bottom: 1px solid #000; }

  .header-inner { padding: 8px 0; }

  .logo { height: 24px; }

  .page {
    max-width: 100%;
    padding: 12px 0;
  }

  .card,
  .cat-card,
  .question-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    padding: 12px 16px;
    margin-bottom: 8px;
  }

  .results-head { padding: 12px 16px; }

  .score-big { font-size: 2rem; color: #000; }

  .score-big .of { color: #444; }

  .eyebrow { color: #000; }

  .level-name { font-size: 1.1rem; margin: 6px 0 4px; }

  .level-desc { color: #333; }

  .hint-banner {
    border: 1px solid #999;
    background: #fff;
    color: #000;
    padding: 8px 12px;
    margin-top: 8px;
  }

  .results-section { margin-top: 12px; }

  .section-title { font-size: 1rem; margin-bottom: 8px; }

  .radar-card { break-inside: avoid; }

  .radar-svg { max-width: 380px; }

  .legend { color: #333; }

  .score-chip {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cat-head h3 { font-size: 0.95rem; }

  .next-step strong { color: #000; }

  .spread-note { color: #333; }

  .cta-block {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
    padding: 12px 16px;
    margin-top: 10px;
    break-inside: avoid;
  }

  .cta-text { font-size: 0.95rem; margin: 0; }
}
