/* ============================================================
   BrregWeb – shared design for firma.portch.no / bedrift.portch.no
   Light + dark theme via [data-theme]. Brand accent via --accent.
   ============================================================ */

:root {
    --accent: #2563eb;
    --accent-dark: #3b82f6;

    --radius: 14px;
    --radius-sm: 10px;
    --maxw: 1140px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
}

/* ---- Light theme (default) ---- */
:root, [data-theme="light"] {
    --bg: #f4f6fb;
    --bg-soft: #eaeef6;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-soft: #475569;
    --muted: #94a3b8;
    --accent-color: var(--accent);
    --accent-soft: color-mix(in srgb, var(--accent) 12%, white);
    --hero-grad: radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
    --good: #16a34a;
    --bad: #dc2626;
    --warn: #b45309;
}

/* ---- Dark theme ---- */
[data-theme="dark"] {
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --surface: #131c2e;
    --surface-2: #1a2438;
    --border: #243149;
    --border-strong: #33415c;
    --text: #e8eef7;
    --text-soft: #aab6c9;
    --muted: #6b7a90;
    --accent-color: var(--accent-dark);
    --accent-soft: color-mix(in srgb, var(--accent-dark) 20%, #0b1120);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --hero-grad: radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--accent-dark) 22%, transparent), transparent);
    --good: #4ade80;
    --bad: #f87171;
    --warn: #fbbf24;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.muted { color: var(--muted); }
.text-soft { color: var(--text-soft); }

main { min-height: 60vh; }

/* ============================== Header ============================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: grid; grid-template-columns: 1fr minmax(0, 460px) 1fr; align-items: center; gap: 18px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; justify-self: start; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff; font-weight: 800; font-size: 18px;
    box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-size: 19px; letter-spacing: -.02em; }
.brand-dot { color: var(--accent-color); }
.brand-tld { color: var(--muted); font-weight: 600; }

.header-search { justify-self: center; width: 100%; max-width: 460px; position: relative; display: flex; }
.header-search input {
    width: 100%; height: 42px; padding: 0 46px 0 16px;
    border: 1px solid var(--border-strong); border-radius: 999px;
    background: var(--surface-2); color: var(--text); font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.header-search input:focus {
    outline: none; border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.header-search > button {
    position: absolute; right: 5px; top: 5px; width: 32px; height: 32px;
    border: 0; border-radius: 50%; cursor: pointer;
    background: var(--accent-color); color: #fff; display: grid; place-items: center;
}
.header-search > button svg { width: 17px; height: 17px; }

.header-nav { display: flex; align-items: center; gap: 16px; justify-self: end; }
.header-nav a { color: var(--text-soft); font-weight: 600; font-size: 15px; }
.header-nav a:hover { color: var(--text); text-decoration: none; }
.crumbs .crumb-geo { font-size: 13px; margin-left: auto; }
.crumb-trail { min-width: 0; }
@media (max-width: 760px) {
    .crumbs .crumb-geo { display: none; }
}

.theme-toggle {
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
    display: grid; place-items: center;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ============================== Hero ============================== */
.hero { background: var(--hero-grad); padding: 48px 0 36px; text-align: center; position: relative; z-index: 0; }
/* While the search dropdown is open, lift the hero above the overlapping feature strip. */
.hero.ac-raise { z-index: 40; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 600; color: var(--accent-color);
    background: var(--accent-soft); padding: 6px 13px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(30px, 5vw, 48px); line-height: 1.1; letter-spacing: -.03em;
    margin: 0 0 14px; font-weight: 800;
}
.hero h1 .accent { color: var(--accent-color); }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--text-soft); margin: 0 auto 20px; max-width: 620px; }

.hero-search { max-width: 640px; margin: 0 auto; position: relative; }
.hero-search input {
    width: 100%; height: 60px; padding: 0 130px 0 22px;
    font-size: 17px; border-radius: 16px;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    box-shadow: var(--shadow);
}
.hero-search input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.hero-search > button {
    position: absolute; right: 8px; top: 8px; height: 44px; padding: 0 22px;
    border: 0; border-radius: 11px; cursor: pointer; font-weight: 700; font-size: 15px;
    background: var(--accent-color); color: #fff; display: inline-flex; align-items: center; gap: 8px;
}
.hero-search > button svg { width: 18px; height: 18px; }

@media (min-width: 1024px) {
    .hero { padding-top: 28px; }
    .hero-search { margin-bottom: 28px; }
}

/* ============================== Feature strip ============================== */
.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
    margin: -34px 0 0; position: relative; z-index: 2;
}
.feature-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.feature-card .ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-color); margin-bottom: 14px;
}
.feature-card .ico svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 6px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--text-soft); font-size: 14.5px; }
a.feature-card { color: inherit; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.feature-card:hover { transform: translateY(-2px); border-color: var(--accent-color); box-shadow: var(--shadow); text-decoration: none; }

.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; }

/* ============================== Search results ============================== */
.page { padding: 40px 0 72px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.results-head h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.source-pill {
    font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
    border: 1px solid var(--border); color: var(--text-soft); background: var(--surface-2);
}
.source-pill.live { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }

.result-list { display: grid; gap: 12px; }
.result-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 20px; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.result-card:hover { border-color: var(--accent-color); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.result-card .avatar {
    width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-color); font-weight: 800;
}
.result-card .info { flex: 1; min-width: 0; }
.result-card .info .name { font-weight: 700; color: var(--text); font-size: 16.5px; }
.result-card .info .meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.result-card .orgno { font-variant-numeric: tabular-nums; color: var(--text-soft); font-weight: 600; font-size: 14px; }
.badge {
    display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
    padding: 2px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--text-soft);
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ============================== Company page ============================== */
.company-hero {
    background: var(--hero-grad);
    border-bottom: 1px solid var(--border);
    padding: 36px 0 28px;
}
.crumbs {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px 16px; flex-wrap: wrap;
    font-size: 13.5px; color: var(--muted); margin: 16px 0 6px;
}
.crumbs a { color: var(--text-soft); }
.crumb-trail { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.crumb-sep { color: var(--muted); }
.crumb-current { color: var(--muted); }

/* Right-aligned visitor location chip on the breadcrumb line */
.crumb-geo { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex: none; }
.crumb-geo .cg-flag { font-size: 15px; line-height: 1; }
.crumb-geo .cg-city, .crumb-geo .cg-country { color: var(--text-soft); font-weight: 600; }
.crumb-geo .cg-city:hover, .crumb-geo .cg-country:hover { color: var(--accent-color); }
.crumb-geo .cg-sep { color: var(--muted); margin: 0 1px 0 -2px; }
.company-hero .top { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.company-logo {
    width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 55%, #000));
    color: #fff; font-weight: 800; font-size: 28px; box-shadow: var(--shadow);
}
.company-hero h1 { margin: 0; font-size: clamp(24px, 3.5vw, 34px); letter-spacing: -.02em; }
.company-sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; color: var(--text-soft); font-size: 14.5px; }
.company-sub .orgno { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }

.status-pill {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
    padding: 4px 11px; border-radius: 999px;
}
.status-pill.active { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.status-pill.inactive { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.status-pill svg { width: 14px; height: 14px; }

.site-note {
    margin-top: 16px; font-size: 13.5px; color: var(--text-soft);
    background: var(--surface-2); border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm); padding: 10px 14px; display: inline-flex; gap: 8px; align-items: center;
}
.site-note svg { width: 16px; height: 16px; color: var(--accent-color); flex: none; }

/* ---- Key figures strip ---- */
.keyfigs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.keyfig { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.keyfig .label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.keyfig .value { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.keyfig .value.up { color: var(--good); }
.keyfig .value.down { color: var(--bad); }

/* ---- Box grid ---- */
.box-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 28px; align-items: start; }
.box-col { display: grid; gap: 20px; }

.box {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.box-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.box-head .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-color); }
.box-head .ico svg { width: 17px; height: 17px; }
.box-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.box-body { padding: 8px 20px 18px; }

/* Definition rows */
.dl { display: grid; }
.dl .row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dl .row:last-child { border-bottom: 0; }
.dl dt { color: var(--text-soft); font-size: 14px; }
.dl dd { margin: 0; text-align: right; font-weight: 600; font-size: 14.5px; }
.dl dd.tabular { font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.chip {
    font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 9px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
}
.chip b { color: var(--text); }

/* Roles list */
.people { display: grid; gap: 2px; }
.person { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: 0; }
.person .pic { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-color); font-weight: 700; font-size: 14px; }
.person .who { flex: 1; }
.person .who .nm { font-weight: 600; }
.person .who .rl { font-size: 13px; color: var(--muted); }
.person .born { font-size: 13px; color: var(--muted); }

/* Contact buttons */
.contact-list { display: grid; gap: 8px; }
.contact-list a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 500; font-size: 14.5px; }
.contact-list a:hover { border-color: var(--accent-color); text-decoration: none; }
.contact-list a svg { width: 18px; height: 18px; color: var(--accent-color); flex: none; }

/* Financial table */
.fin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-table th, .fin-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.fin-table th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.fin-table th:first-child, .fin-table td:first-child { text-align: left; }
.fin-table tbody tr:last-child td { border-bottom: 0; }
.fin-table td.pos { color: var(--good); font-weight: 600; }
.fin-table td.neg { color: var(--bad); font-weight: 600; }

.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: 6px; }
.mini-bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; }
.mini-bars .bar { width: 100%; max-width: 46px; background: var(--accent-color); border-radius: 5px 5px 0 0; opacity: .55; min-height: 4px; transition: opacity .15s; }
.mini-bars .bar-col:hover .bar { opacity: .8; }
.mini-bars .bar-col.active .bar { opacity: 1; }
.mini-bars .bar-yr { font-size: 11.5px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.mini-bars .bar-col.active .bar-yr { color: var(--text); font-weight: 700; }

/* Similar list inside sidebar */
.similar a { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.similar a:last-child { border-bottom: 0; }
.similar a:hover { text-decoration: none; color: var(--accent-color); }
.similar .av { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-color); font-weight: 700; font-size: 13px; }
.similar .nm { font-weight: 600; font-size: 14px; }
.similar .mt { font-size: 12.5px; color: var(--muted); }

/* About page */
.prose { max-width: 720px; }
.prose h1 { font-size: 30px; letter-spacing: -.02em; }
.prose h2 { font-size: 20px; margin-top: 30px; }
.prose p, .prose li { color: var(--text-soft); }
.prose code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; }

/* ============================== Responsive ============================== */
@media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr; margin-top: 28px; }
    .box-grid { grid-template-columns: 1fr; }
    .keyfigs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .header-search { display: none; }
    .keyfigs { grid-template-columns: 1fr 1fr; }
    .hero { padding: 36px 0 28px; }
}

/* ============================== Autocomplete ============================== */
.has-ac.ac-open { z-index: 200; }   /* lift the form (and its dropdown) above neighbours */
.ac-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 44px -12px rgba(15, 23, 42, .35), 0 4px 12px -4px rgba(15, 23, 42, .15);
    padding: 6px;
    overflow: hidden;           /* rows are capped server-side; no scrollbar */
}
[data-theme="dark"] .ac-list {
    box-shadow: 0 14px 36px -8px rgba(0, 0, 0, .6);
}
.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;               /* allow children to truncate */
    text-align: left;
    padding: 10px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}
.ac-item:hover,
.ac-item.active {
    background: var(--accent-soft);
}
.ac-ico {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--accent-color);
    border: 1px solid var(--border);
}
.ac-item:hover .ac-ico,
.ac-item.active .ac-ico {
    background: color-mix(in srgb, var(--accent-color) 14%, var(--surface));
    border-color: color-mix(in srgb, var(--accent-color) 35%, transparent);
}
.ac-ico svg { width: 18px; height: 18px; }
.ac-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-name, .ac-meta {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-name {
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.35;
}
.ac-name mark { background: transparent; color: var(--accent-color); font-weight: 800; }
.ac-meta {
    font-size: 12.5px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.ac-go {
    flex: 0 0 auto;
    color: var(--muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .12s, transform .12s;
}
.ac-item:hover .ac-go,
.ac-item.active .ac-go { opacity: 1; transform: none; color: var(--accent-color); }
.ac-go svg { width: 17px; height: 17px; display: block; }
.ac-foot {
    width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    border: 0; border-top: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    background: transparent;
    color: var(--text-soft);
    font: inherit; font-size: 12.5px; font-weight: 600;
    text-align: left; cursor: pointer;
}
.ac-foot:hover { background: var(--surface-2); color: var(--accent-color); }
.hero-search .ac-list { padding: 7px; }
.hero-search .ac-item { padding: 9px 12px; }
.hero-search .ac-name { font-size: 15.5px; }

/* ============================== Not found ============================== */
.notfound { padding: 70px 0; }
.nf-card { max-width: 560px; margin: 0 auto; text-align: center; }
.nf-card .hero-search { margin-top: 26px; }
.nf-glyph {
    width: 64px; height: 64px; margin: 0 auto 22px;
    display: grid; place-items: center; border-radius: 16px;
    background: var(--surface-2); color: var(--accent-color); border: 1px solid var(--border);
}
.nf-glyph svg { width: 30px; height: 30px; }
.nf-card h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 10px; }
.nf-card .lead { color: var(--text-soft); font-size: 16px; margin: 0; }
.nf-actions { margin-top: 22px; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px; font-weight: 600;
    border: 1px solid var(--border); color: var(--text-soft);
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }

/* ============================== Cookie banner ============================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    padding: 16px 0;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 260px; }
.cookie-banner-text p { margin: 0; }
.cookie-banner-text .muted { font-size: 13px; margin-top: 4px; }
.cookie-banner-actions { display: flex; gap: 10px; }
.cookie-banner-actions .btn-ghost,
.cookie-actions .btn-ghost { cursor: pointer; }

/* ============================== Forms ============================== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 18%, transparent);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.text-danger { color: #dc2626; font-size: 13px; }

/* ============================== Ad banner / Vipps ============================== */
.ad-banner { margin: 64px 0 48px; }
.ad-inner {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 12%, var(--surface)), var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent-color) 25%, var(--border));
    border-radius: 18px; padding: 22px 26px;
}
.ad-copy { flex: 1 1 320px; min-width: 0; }
.ad-eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--accent-color); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.ad-copy h3 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 6px; }
.ad-copy p { color: var(--text-soft); margin: 0 0 10px; font-size: 15px; }
.ad-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ad-perks li { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-soft); }
.ad-perks li svg { width: 15px; height: 15px; color: var(--accent-color); flex: 0 0 auto; }
.ad-buy { flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 200px; }
.ad-price { display: flex; align-items: baseline; gap: 6px; }
.ad-price .amt { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.ad-price .cur { font-size: 16px; font-weight: 600; color: var(--text-soft); }
.ad-buy form { margin: 0; }
.ad-fine { font-size: 12px; color: var(--muted); }

.vipps-btn {
    width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #ff5b24; color: #fff; border: 0; border-radius: 999px;
    padding: 13px 22px; font-size: 16px; font-weight: 600; cursor: pointer;
    box-shadow: 0 2px 10px -2px rgba(255, 91, 36, .55);
    transition: filter .15s, transform .05s;
}
.vipps-btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.vipps-btn:active { transform: translateY(1px); }
.vipps-btn .vp { font-weight: 800; letter-spacing: -.01em; }

/* Payment result pages */
.pay-result { padding: 64px 0; }
.pay-card { max-width: 520px; margin: 0 auto; text-align: center; }
.pay-glyph {
    width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%;
    font-size: 30px;
}
.pay-glyph.ok { background: color-mix(in srgb, var(--ok, #16a34a) 16%, var(--surface)); color: var(--ok, #16a34a); }
.pay-glyph.wait { background: var(--surface-2); color: var(--text-soft); }
.pay-glyph.bad { background: color-mix(in srgb, #dc2626 14%, var(--surface)); color: #dc2626; }
.pay-card h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 8px; }
.pay-card p { color: var(--text-soft); margin: 0 0 6px; }
.pay-actions { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
    .ad-inner { padding: 20px; }
    .ad-buy { width: 100%; }
}

/* ============================== API page ============================== */
.api-hero { text-align: center; margin-bottom: 34px; }
.api-hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--accent-color); background: var(--accent-soft); padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.api-hero h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 0 0 12px; }
.api-hero .lead { color: var(--text-soft); font-size: clamp(16px, 2vw, 19px); max-width: 720px; margin: 0 auto; }
.api-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.api-features { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.api-features h2 { font-size: 20px; margin: 28px 0 14px; }
.api-features h2:first-child { margin-top: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-soft); font-size: 14.5px; }
.check-list li svg { width: 18px; height: 18px; color: var(--good); flex: none; margin-top: 2px; }
.api-buy { position: sticky; top: 86px; }
.buy-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); text-align: center; }
.buy-card .ad-price { justify-content: center; margin-bottom: 10px; }
.buy-card .muted { margin-bottom: 18px; }

@media (max-width: 900px) {
    .api-grid { grid-template-columns: 1fr; }
    .api-buy { position: static; }
}

/* ============================== Company extras ============================== */
.status-pill.neutral { color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); }

/* Typed logo glyph (emoji) */
.company-logo.glyph { font-size: 32px; }
.company-logo.kind-restaurant { background: linear-gradient(135deg, #f59e0b, #d97706); }
.company-logo.kind-electrician { background: linear-gradient(135deg, #f59e0b, #ca8a04); }
.company-logo.kind-cleaning { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.company-logo.kind-construction { background: linear-gradient(135deg, #f97316, #ea580c); }

/* Trust / registry badges */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.badge {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 13px 7px 11px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.badge-glyph { font-size: 19px; line-height: 1; }
.badge-text { display: flex; flex-direction: column; line-height: 1.25; }
.badge-text b { font-size: 13.5px; }
.badge-text span { font-size: 11.5px; color: var(--muted); }
.badge.tone-good { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.badge.tone-good b { color: var(--good); }
.badge.tone-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.badge.tone-bad b { color: var(--bad); }
.badge.tone-neutral { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.badge.tone-neutral b { color: var(--warn); }
.badge.tone-info b { color: var(--accent-color); }

/* Sub-labels and free-text blocks inside boxes */
.sub-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 8px; }
.box-body > .sub-label:first-child { margin-top: 4px; }
.rule-text { margin: 0 0 8px; font-size: 14.5px; color: var(--text); line-height: 1.5; }

/* Register blocks (elvirksomhet etc.) */
.reg-block { padding: 6px 0 4px; border-bottom: 1px solid var(--border); }
.reg-block:last-child { border-bottom: 0; }
.reg-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.reg-top b { font-size: 15px; }

/* Smiley (Mattilsynet) */
.smiley-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.smiley-hero .smiley-face { font-size: 44px; line-height: 1; }
.smiley-hero .smiley-score { font-size: 17px; font-weight: 700; }
.smiley-hero.tone-good { background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--border)); }
.smiley-hero.tone-neutral { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.smiley-hero.tone-bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.theme { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.tface { font-size: 16px; line-height: 1; }

/* Shareholders */
.holders { display: grid; gap: 12px; }
.holder .hrow { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.holder .hname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holder .hpct { color: var(--text-soft); font-weight: 700; flex: none; }
.holder .hbar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.holder .hbar span { display: block; height: 100%; border-radius: 999px; background: var(--accent-color); }

/* Announcements */
.announce { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.announce li { display: flex; gap: 12px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.announce li:last-child { border-bottom: 0; padding-bottom: 0; }
.announce .when { color: var(--muted); flex: none; min-width: 82px; }

@media (max-width: 640px) {
    .theme-grid { grid-template-columns: 1fr; }
}

/* Generic company logo (office icon instead of a letter) */
.company-logo.generic svg { width: 32px; height: 32px; }

/* Box-head trailing action link (e.g. "Vis alt") */
.box-head .head-link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent-color); white-space: nowrap; }
.box-head .head-link:hover { text-decoration: underline; }

/* Accounts: year selector + detail grid + trend */
.fin-controls { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.fin-controls label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.fin-controls select {
    font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 9px;
    padding: 7px 12px; cursor: pointer;
}
.fin-controls .muted { margin-left: auto; font-size: 12.5px; }
.fin-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-detail .fd { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.fin-detail .fd .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-detail .fd .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fin-detail .fd .v.pos { color: var(--good); }
.fin-detail .fd .v.neg { color: var(--bad); }
.trend { margin-top: 16px; }
.trend .trend-cap { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }

/* Sub-units */
.subunits { display: grid; gap: 2px; }
.subunit { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.subunit:last-child { border-bottom: 0; }
.subunit.closed { opacity: .55; }
.subunit .su-main { flex: 1; min-width: 0; }
.subunit .su-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.subunit .su-tag { font-size: 11px; font-weight: 700; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); padding: 1px 7px; border-radius: 999px; }
.subunit .su-meta { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.subunit .su-meta a { color: var(--text-soft); display: inline-flex; align-items: center; gap: 4px; }
.subunit .su-meta a:hover { color: var(--accent-color); }
.subunit .su-meta svg { width: 13px; height: 13px; }
.subunit .su-smiley { font-size: 26px; line-height: 1; flex: none; }
.subunit .su-name > a:first-child { color: var(--text); }
.subunit .su-name > a:first-child:hover { color: var(--accent-color); }
.su-ext { font-size: 11px; font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.su-ext:hover { color: var(--accent-color); }

/* Names as links keep the regular text colour until hover */
.people .nm a, .holder .hname a { color: var(--text); }
.people .nm a:hover, .holder .hname a:hover { color: var(--accent-color); }
a.chip:hover { border-color: var(--accent-color); text-decoration: none; }

/* ============================================================
   Site footer
   ============================================================ */
.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 28px 0 18px;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    justify-content: space-between;
    align-items: flex-start;
}
.footer-about { max-width: 320px; }
.footer-about strong { color: var(--text); }
.footer-brand { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.footer-brand .brand-dot { color: var(--accent-color); }
.site-footer .muted { font-size: 13.5px; margin: 8px 0 0; }
.footer-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-cols h4 {
    margin: 0 0 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 700;
}
.footer-cols a {
    display: block;
    color: var(--text-soft);
    font-size: 14px;
    padding: 4px 0;
}
.footer-cols a:hover { color: var(--accent-color); text-decoration: none; }
.footer-cols a i {
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 8px;
}
.footer-bottom {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
}
.footer-geo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12.5px;
}
.footer-geo-pin svg { width: 14px; height: 14px; display: block; opacity: .8; }
.footer-feedback {
    text-align: center;
    margin-top: 10px;
}
.footer-feedback .fb-lead {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 10px;
}
.footer-feedback .fb-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 24px;
}
.footer-feedback .fb-row-extra {
    margin-top: 12px;
    gap: 8px 18px;
}
.footer-feedback .fb-pair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-feedback .fb-icons {
    display: inline-flex;
    gap: 8px;
}
.footer-feedback .fb-label {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500;
}
.footer-feedback .fb-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--surface-2, var(--surface));
    border: 1px solid var(--border);
    font-size: 16px;
    transition: transform .12s, border-color .12s;
    cursor: pointer;
}
.footer-feedback .fb-item:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.footer-feedback a.fb-item { text-decoration: none; }
@media (max-width: 640px) {
    .footer-inner { gap: 28px; }
    .footer-cols { gap: 36px; }
}

/* ---------- World registers (/verden) ---------- */
.world-hero { padding: 40px 0 8px; }
.world-hero h1 { font-size: clamp(26px, 4vw, 38px); margin: 6px 0 10px; }
.world-hero .lead { max-width: 760px; }
.world-wrap { padding-bottom: 64px; }

.fatf-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.fatf-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; line-height: 1.4;
    border: 1px solid transparent; white-space: nowrap;
}
.fatf-badge b { font-weight: 800; }
.fatf-badge.standard { background: color-mix(in srgb, #16a34a 14%, var(--surface)); color: #15803d; border-color: color-mix(in srgb, #16a34a 30%, transparent); }
.fatf-badge.grey     { background: color-mix(in srgb, #d97706 16%, var(--surface)); color: #b45309; border-color: color-mix(in srgb, #d97706 32%, transparent); }
.fatf-badge.black    { background: color-mix(in srgb, #dc2626 16%, var(--surface)); color: #b91c1c; border-color: color-mix(in srgb, #dc2626 34%, transparent); }
[data-theme="dark"] .fatf-badge.standard { color: #4ade80; }
[data-theme="dark"] .fatf-badge.grey     { color: #fbbf24; }
[data-theme="dark"] .fatf-badge.black     { color: #f87171; }

.world-toolbar {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
    justify-content: space-between; margin: 26px 0 6px;
}
.world-search {
    position: relative; flex: 1 1 280px; min-width: 220px;
    display: flex; align-items: center;
}
.world-search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.world-search input {
    width: 100%; padding: 11px 14px 11px 40px;
    border: 1px solid var(--border-strong); border-radius: 12px;
    background: var(--surface); color: var(--text); font-size: 15px;
}
.world-search input:focus { outline: none; border-color: var(--accent-color); }

.world-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-chip {
    padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text-soft); font-size: 13.5px; font-weight: 600;
}
.wf-chip:hover { color: var(--text); border-color: var(--accent-color); }
.wf-chip.active { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }

.world-count { margin: 10px 2px 14px; font-size: 13px; }

.world-list { display: flex; flex-direction: column; gap: 8px; }
.world-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface);
}
.world-row:hover { border-color: var(--border-strong); }
.wr-main { min-width: 0; }
.wr-name { font-weight: 700; font-size: 15.5px; }
.wr-reg { color: var(--text-soft); font-size: 13px; margin-top: 2px; }
.wr-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.wr-link { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.wr-link.disabled { color: var(--muted); }

.world-empty { text-align: center; padding: 30px 0; }

.world-states { margin-top: 52px; }
.world-states h2 { font-size: 22px; margin-bottom: 6px; }
.states-grid {
    display: grid; gap: 12px; margin-top: 18px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.state-card {
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.sc-name { font-weight: 700; }
.sc-reg { font-size: 12.5px; line-height: 1.4; }
.sc-link { font-size: 13px; font-weight: 600; margin-top: 6px; }

.world-about { margin-top: 52px; max-width: 760px; }
.world-about h2 { font-size: 22px; }
.world-about ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.world-about li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.world-about abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }

@media (max-width: 640px) {
    .world-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .wr-side { width: 100%; justify-content: space-between; }
}

/* Flag emoji before a country / state name */
.wr-flag { margin-right: 8px; font-size: 16px; line-height: 1; }

/* FATF badges that are links (legend + per-row + place) */
a.fatf-badge { text-decoration: none; cursor: pointer; }
a.fatf-badge:hover { filter: brightness(1.04); border-color: currentColor; }

/* FATF risk dropdown */
.world-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.wf-select {
    padding: 10px 14px; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text); font-size: 14px; font-weight: 600;
}
.wf-select:focus { outline: none; border-color: var(--accent-color); }

/* ---------- Registers & tilsyn (/registre) ---------- */
.reg-wrap { padding: 26px 0 64px; }
.reg-group { margin-bottom: 38px; }
.reg-group h2 { font-size: 21px; margin-bottom: 4px; }
.reg-intro { margin: 0 0 16px; font-size: 14px; }
.reg-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.reg-group h2 .reg-gico { margin-right: 8px; }
.reg-card {
    display: flex; gap: 12px; align-items: flex-start;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); padding: 14px 16px; text-decoration: none;
}
.reg-card:hover { border-color: var(--accent-color); }
.reg-card-ico {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.reg-card-body { display: flex; flex-direction: column; min-width: 0; }
.reg-name { font-weight: 700; font-size: 15px; color: var(--text); }
.reg-ext { color: var(--muted); font-size: 11px; margin-left: 3px; }
.reg-desc { font-size: 13px; margin-top: 4px; line-height: 1.45; }
.reg-foot { margin-top: 8px; max-width: 720px; font-size: 13px; }

/* ---------- Place pages (/{land}/{by}) ---------- */
.place-wrap { padding: 24px 0 64px; }
.place-note {
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface-2, var(--surface)); padding: 16px 18px; max-width: 720px;
}
.place-note p { margin: 0; }
.place-list { display: flex; flex-direction: column; gap: 8px; }
.place-row {
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); padding: 14px 16px;
}
.place-row:hover { border-color: var(--border-strong); }
.pr-name { font-weight: 700; font-size: 15.5px; }
.pr-meta { font-size: 12.5px; margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.pr-addr { font-size: 13px; margin-top: 4px; }
.pr-addr-label { color: var(--muted); }

/* ---------- Landing: konkurser & kunngjøringer ---------- */
.notices-wrap { padding: 0 0 8px; }
.notices-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.notice-card {
    border: 1px solid var(--border); border-radius: 16px;
    background: var(--surface); padding: 18px 18px 8px;
    border-top: 3px solid var(--border-strong);
}
.notice-card.konkurs { border-top-color: #f59e0b; }
.notice-card.kunngjoring { border-top-color: #2563eb; }

.notice-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.notice-head h2 { font-size: 17px; margin: 0; }
.notice-ico { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; align-items: center; justify-content: center; }
.notice-ico svg { width: 18px; height: 18px; }
.notice-ico.warn { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, var(--surface)); }
.notice-ico.info { color: #1d4ed8; background: color-mix(in srgb, #2563eb 16%, var(--surface)); }
[data-theme="dark"] .notice-ico.warn { color: #fbbf24; }
[data-theme="dark"] .notice-ico.info { color: #93c5fd; }

.notice-list { display: flex; flex-direction: column; }
.notice-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-top: 1px solid var(--border);
}
.notice-row:first-child { border-top: none; }
.nr-main { min-width: 0; }
.nr-name { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-name a { color: var(--text); }
.nr-name a:hover { color: var(--accent-color); }
.nr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.nr-type { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.nr-type.tone-warn { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, var(--surface)); }
.nr-type.tone-info { color: #1d4ed8; background: color-mix(in srgb, #2563eb 14%, var(--surface)); }
[data-theme="dark"] .nr-type.tone-warn { color: #fbbf24; }
[data-theme="dark"] .nr-type.tone-info { color: #93c5fd; }
.nr-date { font-size: 12px; color: var(--muted); }
.nr-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.notices-foot { margin: 14px 2px 0; font-size: 12.5px; }

@media (max-width: 560px) {
    .notice-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .nr-name { white-space: normal; }
}

/* ---------- Flag images (emoji flags don't render on Windows) ---------- */
.flag-img {
    display: inline-block; vertical-align: middle;
    width: 20px; height: 15px; object-fit: cover;
    border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.wr-flag.flag-img { margin-right: 8px; }

/* Breadcrumb line: vertically centre trail + geo chip in a dedicated bar */
.crumbs { min-height: 32px; }
.crumb-trail { align-items: center; line-height: 1.5; }
.crumb-geo { display: inline-flex; align-items: center; gap: 5px; line-height: 1.5; }
.crumb-geo .cg-flag { margin-right: 1px; }

/* ---------- Norway geo (/Norge, /Norge/{fylke}) ---------- */
.geo-wrap { padding: 22px 0 64px; }
.geo-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-items: center;
}
.geo-card {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--border); border-radius: 14px;
    background: var(--surface); padding: 12px 14px; text-decoration: none;
}
.geo-card:hover { border-color: var(--accent-color); }
.geo-vaapen {
    width: 40px; height: 48px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.geo-vaapen img { max-width: 100%; max-height: 48px; }
.geo-info { min-width: 0; }
.geo-name { font-weight: 700; font-size: 15px; color: var(--text); }
.geo-meta { font-size: 12.5px; margin-top: 2px; }

.geo-hero-head { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.geo-hero-vaapen { width: 58px; height: 70px; object-fit: contain; flex-shrink: 0; }

/* Coat-of-arms trail (riks → fylke → kommune) */
.vaapen-trail { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.vt-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; width: 66px; }
.vt-step img { height: 58px; width: auto; max-width: 66px; object-fit: contain; }
.vt-step span { font-size: 11px; color: var(--text-soft); text-align: center; line-height: 1.2; }
.vt-step.current span { font-weight: 700; color: var(--text); }
a.vt-step:hover span { color: var(--accent-color); }
.vt-sep { color: var(--muted); font-size: 12px; }

/* Notices: "Vis alt" link + scrollable lists (showing up to 100) */
.notice-head .notice-all { margin-left: auto; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.notice-head .notice-all i { font-size: 11px; }
.notice-list.scroll { max-height: 560px; overflow-y: auto; padding-right: 4px; }
.notice-list.scroll::-webkit-scrollbar { width: 8px; }
.notice-list.scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

/* Footer column-heading icons */
.footer-cols h4 i { margin-right: 6px; }
.footer-geo .flag-img { margin-left: 7px; }

/* Vipps login button (placeholder – not wired up yet) */
.btn-vipps {
    display: inline-flex; align-items: center; gap: 6px;
    background: #ff5b24; color: #fff; border: none; border-radius: 9px;
    padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer;
    line-height: 1; white-space: nowrap;
}
.btn-vipps:hover { background: #ec4f1c; }
.btn-vipps .vipps-word { font-weight: 800; letter-spacing: -.3px; font-size: 15px; }
.btn-vipps .vipps-dot { color: #fff; }
@media (max-width: 560px) {
    .btn-vipps span:first-child { display: none; } /* compact to just "vipps" on mobile */
}

/* ---------- Status pages (/konkurser, /oppbud, /avvikling) ---------- */
.world-hero h1 i { font-size: 0.85em; margin-right: 6px; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.status-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
    text-decoration: none;
}
.status-tab:hover { border-color: var(--accent-color); color: var(--text); }
.status-tab.active { background: var(--accent-color); border-color: var(--accent-color); color: #fff; }
.status-tab.active i { color: #fff !important; }


/* ---------- Compact list rows (notices / status / place listings) ---------- */
.place-row.compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
}
.place-row.compact .pr-top,
.place-row.compact .pr-bottom {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.place-row.compact .pr-name {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: 14.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.place-row.compact .pr-name a { color: var(--text); }
.place-row.compact .pr-name a:hover { color: var(--accent-color); text-decoration: none; }
.place-row.compact .pr-org {
    flex: none;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--text-soft);
}
.place-row.compact .pr-bottom {
    margin-top: 1px;
}
.place-row.compact .pr-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.place-row.compact .nr-date {
    font-size: 12px;
    color: var(--muted);
}
.place-row.compact .nr-link {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.place-row.compact .pr-addr {
    margin-top: 2px;
    font-size: 13px;
}

@media (max-width: 560px) {
    .place-row.compact .pr-top,
    .place-row.compact .pr-bottom {
        flex-wrap: wrap;
        gap: 4px;
    }
    .place-row.compact .pr-name { white-space: normal; }
}

/* Footer feedback: label sits between the thumb icons */
.footer-feedback .fb-row-main {
    gap: 10px;
}

/* ============================== Masonry.no niche theme ============================== */
[data-brand="masonry"] .brand-mark {
    background: linear-gradient(135deg, #d4af37, #9a7b2b);
    color: #111;
}
[data-brand="masonry"] .brand-dot { color: #d4af37; }
[data-brand="masonry"] .brand-tld { color: #aab6c9; }
[data-brand="masonry"] .hero h1,
[data-brand="masonry"] .masonry-content h2,
[data-brand="masonry"] .masonry-network-head h2 {
    font-family: 'Cinzel', 'Inter', serif;
    letter-spacing: 0.02em;
}
[data-brand="masonry"] .hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
[data-brand="masonry"] .masonry-hero {
    background: radial-gradient(1200px 500px at 80% -10%, rgba(212,175,55,0.14), transparent);
}

.masonry-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}
.masonry-sidebar { position: sticky; top: 86px; }
.masonry-sidebar .buy-card { text-align: left; }
.masonry-sidebar .buy-card h3 { margin-top: 0; font-size: 18px; }

.masonry-price-table { display: grid; gap: 8px; margin-top: 12px; }
.masonry-price-table .mp-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 14.5px;
}
.masonry-price-table .mp-row:last-child { border-bottom: 0; }
.masonry-price-table .mp-row span:last-child { font-weight: 700; white-space: nowrap; }

.masonry-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.masonry-steps li { color: var(--text-soft); font-size: 15px; }
.masonry-steps li::marker { color: var(--accent-color); font-weight: 700; }

.masonry-cta {
    margin-top: 48px;
    text-align: center;
    padding: 34px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.masonry-cta h2 { margin: 0 0 8px; }
.masonry-cta p { margin: 0 0 16px; }

.masonry-network-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.masonry-network-head h2 { margin: 0; font-size: 22px; }
.masonry-network-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.masonry-network-card {
    display: grid; gap: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 16px; color: var(--text); text-decoration: none;
    box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s;
}
.masonry-network-card:hover {
    border-color: var(--accent-color); transform: translateY(-2px); text-decoration: none;
}
.mnc-name { font-weight: 700; font-size: 15px; }
.mnc-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mnc-badge {
    justify-self: start;
    font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
    padding: 3px 8px; border-radius: 6px;
    background: var(--accent-soft); color: var(--accent-color);
}

@media (max-width: 900px) {
    .masonry-grid { grid-template-columns: 1fr; }
    .masonry-sidebar { position: static; }
    .masonry-network-list { grid-template-columns: 1fr; }
}

select.form-control {
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}

/* ============================== Nettsider promo banner on company pages ============================== */
.ad-banner.nettsider-banner { margin: 48px 0; }
.nettsider-banner .ad-copy a { font-weight: 600; text-decoration: underline; }
.nettsider-banner .ad-copy a:hover { color: var(--accent-dark); }

/* ============================== Masonry local company list on homepage ============================== */
.local-masonry { padding: 36px 0 64px; }
[data-brand="masonry"] .local-masonry .masonry-network-head h2 {
    font-family: 'Cinzel', 'Inter', serif; letter-spacing: 0.02em;
}

/* ============================== User menu ============================== */
.user-menu { position: relative; }
.user-menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
    border-radius: 9px; padding: 8px 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; line-height: 1;
}
.user-menu-btn i { font-size: 16px; color: var(--accent-color); }
.user-menu-btn .user-name {
    max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 8px 0;
    display: none; flex-direction: column; z-index: 100;
}
.user-dropdown.open { display: flex; }
.user-dropdown a,
.user-dropdown button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: var(--text); font-size: 14px; font-weight: 500;
    background: transparent; border: none; width: 100%; text-align: left; cursor: pointer;
}
.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.user-dropdown form { margin: 0; }
@media (max-width: 560px) {
    .user-menu-btn .user-name { display: none; }
}

/* ============================== Alerts ============================== */
.alert {
    padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px;
}
.alert-success {
    background: color-mix(in srgb, #16a34a 12%, transparent);
    border: 1px solid color-mix(in srgb, #16a34a 30%, transparent);
    color: #16a34a;
}
.alert-danger {
    background: color-mix(in srgb, #dc2626 12%, transparent);
    border: 1px solid color-mix(in srgb, #dc2626 30%, transparent);
    color: #dc2626;
}

/* ============================== Profile card ============================== */
.profile-card {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
    padding: 20px; margin-top: 16px;
}
.profile-card .form-control:disabled {
    background: var(--surface); opacity: .7; cursor: not-allowed;
}
.section-sm { padding: 40px 0; }

/* ============================== Footer Aksjonærer link ============================== */
.footer-cols a i { width: 20px; text-align: center; }
