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

:root {
  --rich-black:     #001219;
  --midnight-green: #005F73;
  --dark-cyan:      #0A9396;
  --tiffany-blue:   #94D2BD;
  --vanilla:        #E9D8A6;
  --gamboge:        #EE9B00;
  --off-white:      #F7F9FA;
  --warm-white:     #FAF8F3;
  --slate:          #5A6B73;
  --border:         #E4EAEC;
  --brand-50:       #f0fafa;
  --brand-100:      #cceeee;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', Menlo, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0,18,25,.06), 0 2px 8px rgba(0,18,25,.06);
  --shadow-md: 0 1px 3px rgba(0,18,25,.05), 0 4px 16px rgba(0,18,25,.09);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--rich-black);
  background: var(--off-white);
}

/* ── HEADER ── */
header {
  background: linear-gradient(145deg, var(--rich-black) 0%, var(--midnight-green) 100%);
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(10,147,150,.18) 0%, transparent 70%);
  pointer-events: none;
}
.header-inner { position: relative; }
.header-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tiffany-blue);
  margin-bottom: 12px;
}
header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--vanilla);
  line-height: 1.1;
  margin-bottom: 8px;
}
header p {
  font-size: 15px;
  color: rgba(255,255,255,.55);
  max-width: 460px;
  margin: 0 auto;
}
.header-logo {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-decoration: none;
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.header-logo:hover { color: var(--tiffany-blue); }

/* ── LAYOUT ── */
.container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── CARDS ── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--rich-black);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.4rem;
}
.card-intro {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 1rem;
  line-height: 1.55;
}

/* ── SEARCH BOX ── */
.search-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.search-box h2 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rich-black);
  margin-bottom: 0.3rem;
}
.search-hint {
  font-size: 0.83rem;
  color: var(--slate);
  margin-bottom: 1rem;
}
.input-row { display: flex; gap: 0.75rem; }
.input-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--rich-black);
  background: var(--off-white);
  transition: border-color .15s;
}
.input-row input:focus { outline: none; border-color: var(--dark-cyan); background: white; }
.input-row input::placeholder { color: #aab4b8; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--dark-cyan);
  color: white;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-primary:hover { background: var(--midnight-green); }
.btn-primary:disabled { background: var(--tiffany-blue); cursor: not-allowed; }

.btn-outline {
  background: white;
  color: var(--midnight-green);
  border: 1.5px solid var(--midnight-green);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
}
.btn-outline:hover { background: var(--brand-50); }

.btn-teal {
  background: var(--midnight-green);
  color: white;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
}
.btn-teal:hover { background: var(--rich-black); }

/* ── PROGRESS ── */
.progress-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  display: none;
}
.progress-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--rich-black);
}
.progress-bar-outer {
  background: var(--brand-100);
  border-radius: 99px;
  height: 6px;
  margin: 0.75rem 0;
}
.progress-bar-inner {
  background: var(--dark-cyan);
  height: 6px;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-msg { font-size: 0.85rem; color: var(--slate); }

/* ── SCORE ── */
.score-big {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--dark-cyan);
  line-height: 1;
}
.score-sub { font-size: 0.85rem; color: var(--slate); margin-top: 0.3rem; margin-bottom: 1rem; }
.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.score-item {
  text-align: center;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}
.score-item .val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark-cyan);
  line-height: 1;
}
.score-item .lbl { font-size: 0.78rem; font-weight: 600; color: var(--rich-black); margin-top: 0.25rem; }
.score-item .lbl-desc { font-size: 0.7rem; color: var(--slate); margin-top: 0.1rem; }

/* ── TRAFFIC LIGHTS ── */
.traffic-light { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.traffic-light:last-child { border-bottom: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.dot.grønn { background: #22c55e; }
.dot.gul    { background: var(--gamboge); }
.dot.rød    { background: #dc2626; }

/* ── SEO ACCORDION ── */
.seo-row { border-bottom: 1px solid #f0f4f5; font-size: 0.9rem; }
.seo-row:last-child { border-bottom: none; }
.seo-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  cursor: pointer;
  user-select: none;
  gap: 1rem;
}
.seo-row-header:hover { background: var(--brand-50); border-radius: var(--radius-sm); }
.seo-row-label { flex: 1; font-size: 0.88rem; }
.seo-row-detail {
  padding: 0.3rem 0 0.6rem 0.5rem;
  font-size: 0.82rem;
  color: var(--slate);
  display: none;
  border-left: 2px solid var(--tiffany-blue);
  margin: 0 0 0.4rem 0.2rem;
  padding-left: 0.75rem;
}
.seo-row-detail.open { display: block; }
.seo-row-value { font-size: 0.79rem; color: #8a9ea5; margin-top: 0.25rem; word-break: break-all; font-style: italic; }
.seo-row-why  { color: #b91c1c; margin-top: 0.3rem; font-size: 0.82rem; }
.seo-row-good { color: #166534; margin-top: 0.3rem; font-size: 0.82rem; }
.chevron { font-size: 0.65rem; color: #aab4b8; flex-shrink: 0; }
.ok   { color: #16a34a; font-weight: 600; font-size: 0.82rem; }
.fail { color: #dc2626; font-weight: 600; font-size: 0.82rem; }

/* ── KEYWORDS ── */
.keyword-chip {
  display: inline-block;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  margin: 0.2rem;
  color: var(--midnight-green);
}
.keyword-chip .comp { font-size: 0.72rem; margin-left: 0.3rem; color: var(--slate); }

/* ── RECOMMENDATIONS ── */
.rec-item {
  border-left: 3px solid var(--dark-cyan);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--brand-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.rec-item h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--rich-black); }
.rec-item p  { font-size: 0.85rem; color: var(--slate); }
.rec-badges  { margin-top: 0.4rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}
.badge.høy    { background: #fee2e2; color: #b91c1c; }
.badge.middels { background: #fef9c3; color: #854d0e; }
.badge.lav    { background: #dcfce7; color: #166534; }

/* ── SPEED ── */
.speed-row { display: flex; gap: 2rem; margin-top: 0.75rem; }
.speed-item { text-align: center; }
.speed-val { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.speed-val.good     { color: #16a34a; }
.speed-val.ok-speed { color: var(--gamboge); }
.speed-val.bad      { color: #dc2626; }
.speed-label { font-size: 0.82rem; color: var(--slate); margin-top: 0.2rem; }

/* ── SOCIAL ── */
.social-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.social-chip { padding: 0.25rem 0.75rem; border-radius: 99px; font-size: 0.82rem; text-decoration: none; }
.social-chip.found   { background: #dcfce7; color: #166534; }
.social-chip.missing { background: var(--off-white); color: #aab4b8; border: 1px solid var(--border); }

/* ── PAID SECTIONS ── */
.paid-section-heading {
  display: flex; align-items: center; gap: 10px; margin-bottom: 0.25rem;
}
.section-pill {
  display: inline-block; font-size: 9px; font-family: 'JetBrains Mono', monospace;
  letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px;
  border-radius: 99px; background: #0A9396; color: #fff; white-space: nowrap;
}
.paid-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 1rem; }
.paid-table th {
  text-align: left; font-size: 0.75rem; font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: .06em; color: var(--slate);
  border-bottom: 1px solid var(--border); padding: 0.4rem 0.5rem;
}
.paid-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--off-white); vertical-align: middle; }
.paid-table tr:last-child td { border-bottom: none; }
.rank-pos { font-weight: 700; color: #166534; }
.rank-none { color: var(--slate); font-size: 0.8rem; }
.vol-bar-wrap { display: flex; align-items: center; gap: 8px; }
.vol-bar { height: 6px; border-radius: 3px; background: #0A9396; min-width: 3px; }
.vol-num { font-size: 0.78rem; color: var(--slate); min-width: 36px; }

.sitemap-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.sitemap-stat { background: var(--off-white); border-radius: 10px; padding: 0.75rem 1rem; }
.sitemap-stat .ss-val { font-size: 1.3rem; font-weight: 700; color: var(--rich-black); }
.sitemap-stat .ss-lbl { font-size: 0.75rem; color: var(--slate); margin-top: 2px; }

.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
@media (max-width: 480px) { .tech-grid { grid-template-columns: 1fr; } }
.tech-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; background: var(--off-white); border-radius: 8px; padding: 0.5rem 0.75rem; }
.tech-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tech-dot.ok { background: #22c55e; }
.tech-dot.warn { background: #f59e0b; }
.tech-dot.bad { background: #ef4444; }

.tracking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 520px) { .tracking-grid { grid-template-columns: 1fr; } }
.tracking-col h5 { font-size: 0.78rem; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); margin: 0 0 0.5rem; }
.tracking-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; padding: 3px 10px; border-radius: 99px; margin: 2px; }
.tracking-chip.found   { background: #dcfce7; color: #166534; }
.tracking-chip.missing { background: var(--off-white); color: #94a3b8; border: 1px solid var(--border); }
.insight-box { background: #fefce8; border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0; padding: 0.65rem 0.9rem; font-size: 0.83rem; color: #78350f; margin-top: 0.5rem; }

.wcag-items { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.wcag-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--off-white); border-radius: 8px; padding: 0.6rem 0.85rem; font-size: 0.85rem; }
.wcag-item .wi-label { flex: 1; }
.wcag-item .wi-count { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 700; color: var(--slate); white-space: nowrap; }
.wcag-item.issue .wi-count { color: #dc2626; }
.wcag-ref { font-size: 0.72rem; color: var(--slate); margin-top: 2px; }

.code-box {
  position: relative; background: #0f172a; color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  border-radius: 10px; padding: 1rem 1rem 1rem;
  max-height: 320px; overflow-y: auto; white-space: pre; margin-top: 1rem;
}
.code-box-copy {
  position: sticky; top: 0; float: right; margin: -0.25rem -0.25rem 0.5rem 0.5rem;
  background: rgba(255,255,255,.1); color: #e2e8f0; border: none; cursor: pointer;
  font-size: 0.72rem; padding: 3px 10px; border-radius: 6px;
}
.code-box-copy:hover { background: rgba(255,255,255,.2); }

/* ── ACTION BAR ── */
.action-bar {
  background: linear-gradient(135deg, var(--rich-black) 0%, var(--midnight-green) 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.action-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(10,147,150,.2) 0%, transparent 70%);
  pointer-events: none;
}
.action-bar-inner { position: relative; }
.action-bar h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--vanilla);
  margin-bottom: 0.3rem;
}
.action-bar p { font-size: 0.85rem; color: rgba(255,255,255,.55); margin-bottom: 1.2rem; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── ERROR ── */
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 1rem;
  color: #b91c1c;
  font-size: 0.9rem;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--slate);
  border-top: 1px solid var(--border);
}
footer a { color: var(--dark-cyan); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media print {
  header, .search-box, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #E4EAEC; page-break-inside: avoid; }
  h3 { page-break-after: avoid; }
  body { font-size: 13px; background: white; }
}
