
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #f8fbff;
  --text: #0d1b2a;
  --card: #ffffff;
  --primary: #1b4965;
    --accent: #5fa8d3;


}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body.dark-mode {
  --bg: #0d1b2a;
  --text: #e0f2ff;
  --card: #1b263b;
  --primary: #a8dadc;
    --accent: #457b9d;

}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  padding: 20px 48px;
  background-color: var(--card);
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 96px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand_logo {
  width: 100%;
  height: auto;
  display: block;
}

.brand h1 {
  margin: 0;
  font-size: 3.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 14px;
}

nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Base links */
nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 14px;

  border-radius: 10px;
  white-space: nowrap;

  transition: all 0.2s ease;
}

/* Hover effect */
nav a:hover {
  background-color: #e6f2fa;
  transform: translateY(-1px);
}

/* Active page */
nav a.active {
  color: #ffffff;
  background-color: var(--accent);
}

/* Optional: subtle click feedback */
nav a:active {
  transform: scale(0.97);
}



.form-group input.valid,
.form-group textarea.valid {
  border-color: #2a9d8f;
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #e76f51;
  box-shadow: 0 0 0 3px rgba(231, 111, 81, 0.15);
}
.plan-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 88px;
}

.plan-hero {
  text-align: center;
  margin-bottom: 38px;
}

.plan-hero h2 {
  font-size: 3rem;
  color: #1b4965;
  margin-bottom: 12px;
}

.plan-hero p {
  font-size: 1.15rem;
  color: #1b4965;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.plan-required-note {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.plan-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.field-pill,
.field-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.field-pill {
  padding: 8px 14px;
  font-size: 0.95rem;
}

.field-pill-required,
.required-text {
  background-color: #d8edf8;
  color: #1b4965;
}

.field-pill-optional,
.optional-text {
  background-color: #eef3f7;
  color: #4f697d;
}

.field-type {
  margin-left: 8px;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.required-text {
  color: #c44536;
}

.field-type.required-text::before {
  content: "*";
}

.optional-text {
  color: #6c7a89;
}

.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.95fr);
  gap: 32px;
  align-items: start;
}

.plan-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-card,
.plan-summary {
  background-color: #ffffff;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 10px 24px rgba(13, 27, 42, 0.1);
}

.form-card h3,
.plan-summary h3 {
  font-size: 1.8rem;
  color: #1b4965;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.single-column {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 700;
  color: #1b4965;
  line-height: 1.5;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d7e6f2;
  border-radius: 14px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  background-color: #f8fbff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #5fa8d3;
  box-shadow: 0 0 0 4px rgba(95, 168, 211, 0.18);
}

.form-group.is-invalid input,
.form-group.is-invalid textarea {
  border-color: #e76f51;
  background-color: #fff5f1;
}

.field-error {
  display: none;
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #c44536;
}

.form-group.is-invalid .field-error {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.save-btn,
.clear-btn {
  min-width: 150px;
  border-radius: 999px;
  padding: 16px 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.save-btn:hover,
.clear-btn:hover {
  transform: translateY(-2px);
}

.save-btn {
  background-color: #1b4965;
  color: #ffffff;
  border: none;
  box-shadow: 0 12px 22px rgba(27, 73, 101, 0.16);
}

.clear-btn {
  background-color: #ffffff;
  color: #1b4965;
  border: 2px solid #1b4965;
}

.plan-status {
  min-height: 1.5em;
  text-align: center;
  color: #1b4965;
  font-weight: 700;
}

.plan-summary {
  position: static;
  box-shadow: 0 8px 18px rgba(13, 27, 42, 0.08);
}

.summary-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: #d8edf8;
  color: #1b4965;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-status {
  font-size: 1rem;
  line-height: 1.6;
  color: #36556d;
  margin-bottom: 22px;
}

.summary-block + .summary-block {
  margin-top: 24px;
}

.summary-block h4 {
  font-size: 1.1rem;
  color: #1b4965;
  margin-bottom: 12px;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background-color: #f5f9fc;
  border: 1px solid #dbe8f2;
}

.summary-item.is-missing {
  background-color: #fff5f1;
  border-color: #f3c0b2;
}

.summary-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #567086;
}

.summary-value {
  font-size: 1rem;
  line-height: 1.5;
  color: #0d1b2a;
}

.summary-value.is-empty {
  color: #8ca0b2;
}

.plan-dialog {
  width: min(760px, calc(100vw - 32px));
  border: none;
  border-radius: 28px;
  padding: 0;
  box-shadow: 0 24px 48px rgba(13, 27, 42, 0.2);
}

.plan-dialog::backdrop {
  background-color: rgba(13, 27, 42, 0.5);
}

.plan-dialog-content {
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
}

.dialog-summary {
  display: grid;
  gap: 20px;
  margin: 22px 0 26px;
}

.dialog-group {
  padding: 18px;
  border-radius: 20px;
  background-color: #ffffff;
  border: 1px solid #dbe8f2;
}

.dialog-group h4 {
  color: #1b4965;
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.dialog-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.dialog-list li {
  display: grid;
  gap: 4px;
}

.dialog-close-btn {
  width: 100%;
}

.form-group label {
  display: block;
}

.form-hint {
  display: none;
  font-size: 0.85rem;
  color: #6c7a89;
  margin-bottom: 6px;
}

/* vis når user klikker i feltet */
.form-group:focus-within .form-hint {
  display: block;
}

.warning-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.wave-top svg {
  display: block;
  width: 100%;
  height: 116px;
}
.wave-bottom svg {
  display: block;
  width: 100%;
  height: 80px;
}

.site-footer {
  background-color: #1b4965;
  color: #e0f2ff;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 900px;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(224, 242, 255, 0.16);
  color: #ffd166;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  color: #e0f2ff;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  background-color: rgba(224, 242, 255, 0.12);
  transform: translateY(-1px);
}

.footer-links a.active {
  background-color: var(--accent);
  color: #ffffff;
}

.footer-links a:active {
  transform: scale(0.97);
}
.dark-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  border: 1px solid #d7e6f2;
  border-radius: 999px;
  background-color: #f1f7fc;
}

/* hide default checkbox */
.dark-toggle input {
  display: none;
}

/* slider background */
.slider {
  width: 60px;
  height: 30px;
  background-color: #dbe8f2;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s ease;
}

/* circle */
.slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* active state */
.dark-toggle input:checked ~ .slider {
  background-color: #1b4965;
}

.dark-toggle input:checked ~ .slider::before {
  transform: translateX(30px);
}

/* mode icons */
.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  font-size: 1.1rem;
  line-height: 1;
}

.mode-sun {
  display: none;
}

.mode-moon {
  display: inline-flex;
}

body.dark-mode .mode-sun {
  display: inline-flex;
}

body.dark-mode .mode-moon {
  display: none;
}

body.dark-mode .dark-toggle {
  background-color: #132033;
  border-color: #2d3f5a;
}

body.dark-mode .plan-hero h2,
body.dark-mode .plan-hero p,
body.dark-mode .form-card h3,
body.dark-mode .plan-summary h3,
body.dark-mode .form-group label,
body.dark-mode .plan-status,
body.dark-mode .summary-block h4,
body.dark-mode .dialog-group h4 {
  color: #a8dadc;
}

body.dark-mode .summary-eyebrow {
  background-color: rgba(95, 168, 211, 0.18);
  color: #dff4ff;
}

body.dark-mode .field-pill-required {
  background-color: rgba(95, 168, 211, 0.16);
  color: #a8dadc;
}

body.dark-mode .field-pill-optional {
  background-color: rgba(224, 242, 255, 0.08);
  color: #c8dbea;
}

body.dark-mode .required-text {
  background-color: transparent;
  color: #ffb4a2;
}

body.dark-mode .optional-text {
  background-color: transparent;
  color: #c8dbea;
}

body.dark-mode .form-card,
body.dark-mode .plan-summary,
body.dark-mode .dialog-group {
  background-color: #1b263b;
  border-color: #2d3f5a;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background-color: #132033;
  border-color: #2d3f5a;
  color: #e0f2ff;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
  color: #8fa9bc;
}

body.dark-mode .clear-btn {
  background-color: transparent;
  color: #a8dadc;
  border-color: #a8dadc;
}

body.dark-mode .summary-status,
body.dark-mode .summary-value,
body.dark-mode .form-hint,
body.dark-mode .dialog-list {
  color: #d4e9f6;
}

body.dark-mode .field-error {
  color: #ffb4a2;
}

body.dark-mode .summary-item {
  background-color: #132033;
  border-color: #2d3f5a;
}

body.dark-mode .summary-item.is-missing {
  background-color: #2b2330;
  border-color: #6a4b57;
}

body.dark-mode .summary-label {
  color: #9fb3c9;
}

body.dark-mode .summary-value.is-empty {
  color: #8fa9bc;
}

body.dark-mode .plan-dialog-content {
  background: linear-gradient(180deg, #1b263b 0%, #18283d 100%);
}

body.dark-mode .site-footer {
  background-color: #091524;
}

body.dark-mode .footer-links a {
  color: #e0f2ff;
}

body.dark-mode .footer-links a:hover {
  background-color: rgba(168, 218, 220, 0.14);
}
@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    padding: 20px;
  }

  .brand {
    grid-column: auto;
    justify-self: center;
    justify-content: center;
  }

  .brand-mark {
    width: 80px;
    height: 60px;
  }

  .brand h1 {
    font-size: 2.65rem;
  }

  nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-actions {
    grid-column: auto;
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  .plan-hero h2 {
    font-size: 2.3rem;
  }

  .plan-layout {
    grid-template-columns: 1fr;
  }

  .plan-summary {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .brand h1 {
    font-size: 2.2rem;
  }

  .brand-mark {
    width: 68px;
    height: 51px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-card,
  .plan-summary {
    padding: 22px;
  }
}

@media (max-width: 540px) {
  .field-type {
    display: block;
    width: fit-content;
    margin-top: 6px;
    margin-left: 0;
  }

  .save-btn,
  .clear-btn {
    width: 100%;
  }
}
