/* Kartlegg – Profil, utseende og Om Kartlegg.
 * Del av designsystemet i assets/css/. Filene lastes i nummerrekkefølge fra index.html.
 */
.profile-grid {
  display: grid;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
}
.profile-field input,
.profile-field select {
  border: 1px solid #d9e4eb;
  padding: 12px;
  font-size: 15px;
  background: #fbfcfe;
  color: var(--ink);
  width: 100%;
}
.profile-save {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  font-size: 13px;
  color: #4c6278;
}
.profile-save input {
  height: 18px;
  width: 18px;
  accent-color: var(--teal);
}
.profile-actions {
  display: flex;
  gap: 11px;
  align-items: center;
  flex-wrap: wrap;
}
.profile-status {
  font-size: 13px;
  color: #26796b;
  min-height: 18px;
}
.profile-info {
  color: #667991;
  line-height: 1.6;
  padding-top: 13px;
  max-width: 850px;
}
.profile-trigger {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
}
.profile-trigger:hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* appearance-options */
.appearance-options {
  border: 0;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 0;
  margin: 18px 0 0;
}
.appearance-options legend {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 10px;
}
.appearance-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  min-height: 78px;
  padding: 8px;
  align-content: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.appearance-options label:has(input:checked) {
  background: var(--accent-bg);
  border: 2px solid var(--accent);
}
/* Regel fra «components» som må komme etter reglene over for å vinne */
:is(.service-theme-option,.base-theme-option,.appearance-options label):has(input:checked) {
  border-color: var(--accent-border,var(--accent));
  box-shadow: inset 0 0 0 1px var(--accent-border,var(--accent));
}
/* appearance-options */
.appearance-options input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex: none;
  margin: 0;
}
.appearance-options {
  gap: 9px;
}
.appearance-options label::after {
  content: "";
  order: -1;
  flex-basis: 100%;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(70,91,115,.16);
  background: linear-gradient(145deg,#f7fafc 0 54%,#dce6ef 55%);
  box-shadow: inset 0 1px 0 #fff8;
}
.appearance-options label[data-preview-mode="dark"]::after {
  background: linear-gradient(145deg,#173149 0 54%,#284b65 55%);
}
.appearance-options label[data-preview-mode="system"]::after {
  background: linear-gradient(105deg,#f5f8fb 0 49%,#18324a 50%);
}
.appearance-options label[data-preview-accent="violet"]::after {
  background: linear-gradient(145deg,#edf2f7 0 61%,#7652a6 62%);
}
.appearance-options label[data-preview-accent="blue"]::after {
  background: linear-gradient(145deg,#edf2f7 0 61%,#2679d4 62%);
}
.appearance-options label[data-preview-accent="green"]::after {
  background: linear-gradient(145deg,#edf2f7 0 61%,#16865e 62%);
}
@media(max-width:520px){
  .appearance-options {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .appearance-options label {
    min-height: 72px;
    font-size: 10px;
    padding: 6px;
  }
  .appearance-options label::after {
    height: 25px;
  }
}
.personalization-note {
  font-size: 12px !important;
}
/* about-v0993-hero-inner */
.about-v0993-hero-inner {
  position: relative;
  z-index: 1;
  padding: 30px clamp(20px,3.2vw,42px);
  max-width: 800px;
}
.about-v0993-hero-inner .eyebrow {
  margin: 0 0 8px;
}
@media(max-width:520px){
  .about-v0993-hero-inner {
    padding: 22px 18px;
  }
}
.about-v0993-hero-mark {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-bg);
  font-size: 23px;
  font-weight: 850;
  margin-bottom: 18px;
}
.about-v0993-hero h2 {
  font-size: clamp(25px,3.5vw,37px);
  letter-spacing: -.045em;
  line-height: 1.2;
  margin: 0 0 15px;
  color: var(--ink);
}
.about-v0993-hero p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  margin: 10px 0 0;
}
.about-v0993-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 17px;
}
@media(max-width:820px){
  .about-v0993-grid {
    grid-template-columns: 1fr;
  }
}
/* about-v0993-card */
.about-v0993-card {
  padding: 23px 25px;
}
.about-v0993-card h2,
.about-v0993-storage h2,
.about-v0993-notice h2 {
  font-size: 19px;
  letter-spacing: -.025em;
  margin: 13px 0 13px;
  color: var(--ink);
}
.about-v0993-card p,
.about-v0993-storage p,
.about-v0993-notice p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 10px 0 0;
}
.about-v0993-card strong,
.about-v0993-storage strong,
.about-v0993-notice strong {
  color: var(--ink);
}
/* about-v0993-card-icon */
.about-v0993-card-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 19px;
  font-weight: 800;
  flex: none;
}
.about-v0993-card-icon .ui-icon-svg {
  width: 20px;
  height: 20px;
}
.about-v0993-card-icon,
.about-v0993-hero-mark {
  border-radius: 9px;
  box-shadow: none;
}
.about-v0993-footnote {
  font-size: 12px !important;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 18px !important;
}
/* about-v0993-points */
.about-v0993-points {
  display: grid;
  gap: 14px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.about-v0993-points li {
  padding-left: 20px;
  position: relative;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.about-v0993-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  font-weight: 900;
  color: var(--accent);
}
.about-v0993-points strong {
  color: var(--ink);
}
.about-v0993-storage {
  padding: 23px 25px;
}
/* about-v0993-section-head */
.about-v0993-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.about-v0993-section-head h2 {
  margin: 0 0 4px;
}
.about-v0993-section-head p {
  margin: 0;
}
@media(max-width:520px){
  .about-v0993-section-head {
    align-items: flex-start;
  }
}
.about-v0993-storage-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
@media(max-width:820px){
  .about-v0993-storage-grid {
    grid-template-columns: 1fr;
  }
}
/* about-v0993-storage-item */
.about-v0993-storage-item {
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 9px;
  background: transparent;
}
.about-v0993-storage-item h3 {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 7px;
}
.about-v0993-storage-item p {
  margin: 0;
}
@media(max-width:520px){
  .about-v0993-storage-item {
    padding: 14px;
  }
}
.about-v0993-caution {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 11px;
  padding: 12px 15px;
  margin-top: 16px !important;
}
.about-v0993-notice {
  padding: 21px 25px;
}
@media(max-width:520px){
  /* about-v0993-card */
  .about-v0993-card,
  .about-v0993-storage,
  .about-v0993-notice {
    padding: 19px;
  }
}
.about-v0993-notice h2 {
  margin: 0 0 8px;
}
.about-v0993-contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 1px 22px;
  color: var(--muted);
  font-size: 12px;
}
.about-v0993-contacts a {
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.base-theme-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin-top: 8px;
  gap: 11px;
}
@media(max-width:520px){
  .base-theme-grid,
  .service-theme-grid {
    grid-template-columns: 1fr;
  }
}
/* base-theme-option */
.base-theme-option {
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.base-theme-option input {
  accent-color: var(--accent);
  flex: none;
}
.base-theme-option:has(input:checked) {
  outline: 2px solid var(--accent);
  background: var(--accent-bg);
}
.base-theme-option small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.5;
}
.base-theme-option:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.base-theme-option {
  display: grid;
  grid-template-columns: 18px 72px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 10px;
}
@media(max-width:520px){
  .base-theme-option {
    grid-template-columns: 18px 64px minmax(0,1fr);
  }
}
.base-theme-option,
.service-theme-option,
.appearance-options label {
  border-radius: 14px;
}
.base-theme-option:has(input:checked),
.service-theme-option:has(input:checked),
.appearance-options label:has(input:checked) {
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 42%,transparent),0 8px 20px color-mix(in srgb,var(--accent) 10%,transparent);
}
.base-theme-options[hidden] {
  display: none !important;
}
/* base-theme-preview */
.base-theme-preview {
  position: relative;
  display: block;
  width: 72px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(50,74,102,.20);
}
.base-theme-preview::before {
  content: "";
  position: absolute;
  inset: 6px 6px 6px 22px;
  border-radius: 6px;
  background: rgba(255,255,255,.84);
  box-shadow: -16px 0 0 rgba(255,255,255,.58);
}
.base-theme-preview::after {
  content: "";
  position: absolute;
  left: 27px;
  right: 11px;
  top: 12px;
  height: 5px;
  border-radius: 4px;
  background: #f05a66;
  box-shadow: 0 10px 0 rgba(77,114,151,.22),0 20px 0 rgba(77,114,151,.14);
}
.base-theme-preview[data-theme-preview="standard"] {
  background: linear-gradient(145deg,#edf4fb,#dbe8f5);
}
.base-theme-preview[data-theme-preview="philip"] {
  background: radial-gradient(circle at 17% 8%,#dcf5ff,transparent 28%),linear-gradient(145deg,#0872f2,#06399d);
}
.base-theme-preview[data-theme-preview="philip"]::before {
  background: linear-gradient(145deg,rgba(255,255,255,.38),rgba(31,104,211,.30));
  border: 1px solid #d5f0ff9c;
  box-shadow: -16px 0 0 rgba(88,171,255,.30),inset 0 1px 0 #fff9;
}
.base-theme-preview[data-theme-preview="philip"]::after {
  background: #8bd8ff;
  box-shadow: 0 10px 0 rgba(202,235,255,.42),0 20px 0 rgba(202,235,255,.28);
}
@media(max-width:520px){
  .base-theme-preview {
    width: 64px;
    height: 48px;
  }
}
/* ------------------------------------------------------------------
 * Profilsiden: grupper med kort og rader, slik som innstillinger på en telefon.
 * Kontokortet øverst ligger i 12-account.css.
 * ------------------------------------------------------------------ */
#page-profil {
  max-width: 680px;
}
.profile-settings {
  display: grid;
  gap: 26px;
  margin-top: 26px;
}
.settings-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.settings-group-title {
  margin: 0 4px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .02em;
  color: var(--muted);
}
.settings-group-note {
  margin: 0 4px;
  font-size: 13px !important;
  line-height: 1.45;
  color: var(--muted);
}
.settings-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.settings-card-padded {
  display: grid;
  gap: 18px;
  padding: 16px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 16px;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.settings-row:last-child {
  border-bottom: 0;
}
.settings-row:hover {
  background: color-mix(in srgb,var(--accent-bg) 45%,transparent);
}
.settings-row:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.settings-row-label {
  flex: 1 1 auto;
  min-width: 0;
}
.settings-row-value {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: 15px;
  color: var(--muted);
}
.settings-row-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sender-summary[hidden],
.sender-editor[hidden] {
  display: none;
}
.sender-editor {
  padding: 16px;
}
.sender-editor .profile-body {
  padding: 0;
}
@media(max-width:620px){
  .sender-editor .profile-grid {
    grid-template-columns: 1fr;
  }
}
/* Visning som segmentert valg og aksentfarge som runde fargeprøver. */
#appearanceCard .appearance-options {
  position: relative;
  margin: 0;
  gap: 6px;
}
#appearanceCard .appearance-options legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
#appearanceCard .appearance-options label {
  position: relative;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  box-shadow: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  flex-wrap: nowrap;
  justify-content: center;
}
#appearanceCard .appearance-options label::after {
  content: none;
}
#appearanceCard .appearance-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
#appearanceCard .appearance-options label:has(input:checked) {
  border: 0;
  background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--accent-border,var(--accent));
  color: var(--ink);
  font-weight: 750;
}
#appearanceCard .appearance-options label:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
#appearanceCard .appearance-accent-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#appearanceCard .appearance-accent-options label {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
}
#appearanceCard .appearance-accent-options .swatch {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 50%;
}
#appearanceCard .swatch.blue {
  background: #173b58;
}
:root[data-theme=dark] #appearanceCard .swatch.blue {
  background: #87b8ff;
}
#appearanceCard .swatch.green {
  background: #16865e;
}
#appearanceCard .swatch.violet {
  background: #7652a6;
}
#appearanceCard .appearance-accent-options label:has(input:checked) {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--ink);
}
/* Tjenestetema, kort og sesongpynt åpnes som ark nederst på mobil og som vindu på PC. */
dialog.settings-sheet {
  width: min(560px,100vw);
  max-width: 100vw;
  max-height: min(86dvh,760px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
@media(min-width:771px){
  dialog.settings-sheet {
    margin: auto;
    border-radius: 20px;
  }
}
.settings-sheet::backdrop {
  background: #061525b8;
}
.settings-sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.settings-sheet-head h2 {
  margin: 0;
  font-size: 18px;
}
.settings-sheet-close {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.settings-sheet-body {
  padding: 16px 20px calc(22px + env(safe-area-inset-bottom));
}
.settings-sheet-body>fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.settings-sheet-body>fieldset>legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
/* Skjemaet for avsenderprofilen inne i kortet. */
.sender-editor .profile-grid {
  gap: 14px;
}
.sender-editor .profile-save {
  padding: 16px 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.sender-editor .profile-actions .btn {
  flex: 1 1 160px;
  min-width: 0;
}
.sender-editor .profile-status:empty {
  display: none;
}
.sender-editor .profile-info {
  margin: 0;
  padding-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.settings-sheet-body .season-theme-controls {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
/* Bekreftelsen etter «Bruk profil» står under radene. Innlogget: kontoen husker profilen, så avkrysningen skjules. */
.sender-status {
  margin: 0;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.sender-status:empty,
.sender-summary[hidden]+.sender-status {
  display: none;
}
#page-profil[data-account="member"] .profile-save {
  display: none;
}
#page-profil[data-account="member"] .profile-actions {
  margin-top: 16px;
}

/* Om Kartlegg: utviklingsstatus og «Meld feil». */
.about-status-meta {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.about-status-grid {
  display: grid;
  gap: 14px;
}
@media(min-width:900px){
  .about-status-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
.about-status-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.about-status-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.about-status-item ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  line-height: 1.5;
}
.about-report-button {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 8px;
  text-decoration: none;
}
.about-report-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
