:root {
    color-scheme: dark;
    --bg: #0f1720;
    --surface: #17212b;
    --surface-2: #1e2b37;
    --border: #2a3a48;
    --text: #e6edf3;
    --muted: #93a4b4;
    --primary: #5fe4b8;
    --primary-dark: #35cf9f;
    --success: #3fb950;
    --danger: #f85149;
    --warning: #d29922;
    --on-primary: #05251c;
    --on-primary-hover: #05251c;
    --danger-dark: #d13b33;
    --on-danger: #ffffff;
    --success-text: #7ee787;
    --success-soft: rgba(63, 185, 80, .1);
    --success-border: rgba(63, 185, 80, .4);
    --success-line: rgba(126, 231, 135, .4);
    --danger-text: #ff938a;
    --danger-soft: rgba(248, 81, 73, .1);
    --danger-border: rgba(248, 81, 73, .4);
    --danger-line: rgba(255, 147, 138, .4);
    --primary-text: #7ff0cc;
    --primary-line: rgba(95, 228, 184, .4);
    --warning-text: #e3b341;
    --warning-line: rgba(227, 179, 65, .4);
    --header-bg: #16191f;
    --header-surface: #1f242c;
    --header-border: #2a313b;
    --header-text: #f2f3f3;
    --header-muted: #a5b0bd;
    --header-accent: #7ff0cc;
    --radius: 10px;
}

/*
| Day mode. The dark palette above stays the default; the toggle in the header
| swaps this attribute on <html>, the choice is kept in local storage.
*/
:root[data-theme="day"] {
    color-scheme: light;
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --border: #d5dde6;
    --text: #16202a;
    --muted: #5c6b7a;
    --primary: #0c7f60;
    --primary-dark: #096b50;
    --success: #1a7f37;
    --danger: #cf222e;
    --warning: #9a6700;
    --on-primary: #ffffff;
    --on-primary-hover: #ffffff;
    --danger-dark: #a40e26;
    --on-danger: #ffffff;
    --success-text: #116329;
    --success-soft: rgba(26, 127, 55, .08);
    --success-border: rgba(26, 127, 55, .35);
    --success-line: rgba(26, 127, 55, .4);
    --danger-text: #b42318;
    --danger-soft: rgba(207, 34, 46, .08);
    --danger-border: rgba(207, 34, 46, .35);
    --danger-line: rgba(207, 34, 46, .4);
    --primary-text: #0b6f54;
    --primary-line: rgba(12, 127, 96, .35);
    --warning-text: #9a6700;
    --warning-line: rgba(154, 103, 0, .4);
    /*
    | The console bar stays black in day mode too, so the light palette repeats
    | the header tokens with the very same values.
    */
    --header-bg: #16191f;
    --header-surface: #1f242c;
    --header-border: #2a313b;
    --header-text: #f2f3f3;
    --header-muted: #a5b0bd;
    --header-accent: #7ff0cc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/*
| The application header copies the AWS console bar: a black surface in both
| modes, muted navigation and an accent bar pinned to the bottom edge of the
| current tab.
*/
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.site-header .container {
    max-width: 1400px;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 60px;
}

.brand {
    font-weight: 700;
    white-space: nowrap;
    color: var(--header-text);
    letter-spacing: .2px;
}

.brand span {
    color: var(--header-accent);
}

.nav {
    display: flex;
    gap: 16px;
    margin-left: auto;
    align-items: center;
}

/* The tabs fill the bar, so the accent bar of the current one meets its border. */
.site-header .nav {
    align-self: stretch;
}

.site-header .nav a {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 12px 4px;
    color: var(--header-muted);
    font-size: 14px;
}

.site-header .nav a:hover,
.site-header .nav a.active {
    color: var(--header-text);
    text-decoration: none;
}

.site-header .nav a.active {
    box-shadow: inset 0 -3px 0 var(--header-accent);
}

/*
| The locale select and the buttons live on the black bar as well, so they take
| the header tokens instead of the page surface ones.
*/
.site-header select {
    background: var(--header-surface);
    border-color: var(--header-border);
    color: var(--header-text);
    color-scheme: dark;
}

.site-header select option {
    background: var(--header-surface);
    color: var(--header-text);
}

.site-header .btn-secondary {
    border-color: var(--header-border);
    color: var(--header-text);
}

.site-header .btn-secondary:hover {
    background: var(--header-surface);
    color: var(--header-text);
}

.site-header select:focus,
.site-header .btn-secondary:focus-visible {
    outline: 2px solid var(--header-accent);
    outline-offset: 1px;
}

main {
    padding: 32px 0 60px;
}

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    padding: 18px 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.auth-card {
    max-width: 460px;
    margin: 40px auto;
}

label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.field {
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    color: var(--on-primary-hover);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: var(--on-danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
}

.alert-success {
    background: var(--success-soft);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.alert-error ul {
    margin: 0;
    padding-left: 18px;
}

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

.small {
    font-size: 13px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* The sanctions list browser: the list being read on the left, the menu of
   every list on the right. The main column may not blow up the layout, so it
   is allowed to shrink instead of pushing the menu off the row. */
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
}

.split-main {
    min-width: 0;
}

.split-menu .menu-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    color: inherit;
    text-decoration: none;
}

.split-menu .menu-item:hover {
    background: var(--surface-2);
}

.split-menu .menu-item.active {
    border-color: var(--primary-line);
}

.split-menu .menu-item-title {
    display: block;
}

.split-menu .menu-item > span {
    display: block;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.stat .value {
    font-size: 28px;
    font-weight: 700;
}

.stat .label {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}

tbody tr:hover {
    background: var(--surface-2);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--muted);
}

.badge-primary { color: var(--primary-text); border-color: var(--primary-line); }
.badge-success { color: var(--success-text); border-color: var(--success-line); }
.badge-danger { color: var(--danger-text); border-color: var(--danger-line); }
.badge-warning { color: var(--warning-text); border-color: var(--warning-line); }

.finding {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.findings-cell .finding:last-child {
    margin-bottom: 0;
}

.finding-evidence {
    word-break: break-word;
}

.finding-remediation {
    color: var(--success-text);
    max-width: 60ch;
}

/*
| One classification entry of a report: a confirmed vulnerability or a host
| observation, with the fields that prove it.
*/
.finding-block {
    border-top: 1px solid var(--border);
    padding: 14px 0;
}

.finding-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.finding-block:last-of-type {
    padding-bottom: 0;
}

.finding-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.finding-block .definition-list {
    margin: 0 0 8px;
}

.progress {
    background: var(--surface-2);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    background: var(--primary);
}

.page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 22px;
    margin: 0;
}

.page-head .actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.code-input {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
}

.inline-form {
    display: inline;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar .field {
    margin: 0;
    min-width: 160px;
}

.toolbar .spacer {
    margin-left: auto;
}

.table-scroll {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.table-scroll thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}

.cell-check {
    width: 36px;
}

.cell-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

/* Bodies are quoted in a table cell: keep the column narrow, break the JSON. */
.body-cell {
    max-width: 360px;
    overflow-wrap: anywhere;
}

.chip {
    display: inline-block;
    padding: 1px 8px;
    margin: 0 4px 2px 0;
    border-radius: 6px;
    font-size: 11px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
}

.definition-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 8px 16px;
    font-size: 14px;
    margin: 0;
}

.definition-list dt {
    color: var(--muted);
    font-size: 13px;
}

.definition-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* The full record of a listed party opens inside its table row, so the
   definition list there is one column wide: the cell is already narrow. */
.cell-record {
    min-width: 240px;
}

.cell-record .definition-list {
    grid-template-columns: 1fr;
    gap: 6px;
}

.choice-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    cursor: pointer;
}

.choice input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.choice strong {
    display: block;
    font-size: 14px;
}

.choice .muted {
    font-size: 12px;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.step {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
}

.step.done {
    border-color: var(--success-line);
    color: var(--success-text);
}

.step.current {
    border-color: var(--primary);
    color: var(--text);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.form-actions .spacer {
    margin-left: auto;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.btn.disabled,
.btn[disabled] {
    opacity: .5;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/*
| Theme switch. The button always shows the icon of the mode it leads to, so
| the stylesheet only has to hide the icon that is not the target.
*/
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.theme-toggle svg {
    display: block;
    width: 16px;
    height: 16px;
}

.theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="day"] .theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="day"] .theme-toggle .icon-moon {
    display: block;
}

/*
| The administration shares the customer stylesheet; these two rules mark the
| separate entrance and the moderation notices. It reuses the console header
| markup, so the header tokens are pointed back at its own light surface.
*/
.admin-header {
    --header-bg: var(--surface-2);
    --header-surface: var(--surface-2);
    --header-border: var(--border);
    --header-text: var(--text);
    --header-muted: var(--muted);
    --header-accent: var(--danger);
    background: var(--surface-2);
    border-bottom: 2px solid var(--danger);
}

/* Its compact navigation keeps the spacing and the look it had before. */
.admin-header .nav a {
    display: inline;
    align-self: auto;
    padding: 0;
}

.admin-header .nav a.active {
    box-shadow: none;
}

.admin-header .brand {
    color: var(--danger-text);
}

.admin-banner {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
}




/*
| The "Services" menu and the service search sit on the black bar next to the
| brand, as in the AWS console; both open dark panels painted with the header
| tokens, so they look the same in the day and the night theme.
*/
.service-bar {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 640px;
}

.service-menu,
.service-search {
    position: relative;
}

.service-search {
    flex: 1 1 auto;
    min-width: 220px;
}

.service-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--header-text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.service-menu-button:hover,
.service-menu-button[aria-expanded="true"] {
    background: var(--header-surface);
}

.service-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: flex;
    gap: 32px;
    min-width: 360px;
    padding: 16px 20px;
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    background: var(--header-bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
}

.service-panel[hidden],
.service-results[hidden] {
    display: none;
}

.service-panel-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}

.service-panel-group h3 {
    margin: 0 0 8px;
    color: var(--header-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.service-panel-group a {
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--header-text);
    font-size: 14px;
}

.service-panel-group a:hover {
    background: var(--header-surface);
    text-decoration: none;
}

.service-search input {
    width: 100%;
    padding: 8px 52px 8px 32px;
    border: 1px solid var(--header-border);
    border-radius: 6px;
    background: var(--header-surface);
    color: var(--header-text);
    font-size: 14px;
}

.service-search input::placeholder {
    color: var(--header-muted);
}

.service-search input:focus {
    outline: 2px solid var(--header-accent);
    outline-offset: 1px;
}

.service-search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: var(--header-muted);
    pointer-events: none;
}

.service-search kbd {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 1px 6px;
    border: 1px solid var(--header-border);
    border-radius: 4px;
    color: var(--header-muted);
    font: inherit;
    font-size: 11px;
    pointer-events: none;
}

.service-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: min(420px, 100vw - 40px);
    z-index: 20;
    max-height: 420px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    background: var(--header-bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
    list-style: none;
}

.service-results a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--header-text);
}

.service-results a:hover,
.service-results li.active a {
    background: var(--header-surface);
    text-decoration: none;
}

.service-results li.active a {
    box-shadow: inset 3px 0 0 var(--header-accent);
}

.service-results a span {
    color: var(--header-muted);
    font-size: 12px;
}

.service-results-empty {
    padding: 10px;
    color: var(--header-muted);
    font-size: 14px;
}
@media (max-width: 760px) {
    .grid-4,
    .grid-2,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .site-header .container {
        flex-wrap: wrap;
        /* No bottom padding: the wrapped nav row then ends on the header's bottom border and the active tab bar meets it. */
        padding: 10px 20px 0;
    }

    .service-bar {
        order: 1;
        flex-basis: 100%;
        max-width: none;
        padding-bottom: 10px;
    }

    .service-search {
        min-width: 0;
    }

    .service-panel {
        flex-direction: column;
        gap: 16px;
        min-width: 0;
        width: calc(100vw - 40px);
    }

    .nav {
        order: 2;
        margin-left: 0;
        width: 100%;
    }

    .theme-toggle [data-theme-label] {
        display: none;
    }
}

/* Landing page */
.landing-hero {
    text-align: center;
    padding: 56px 0 32px;
}

.landing-hero h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    margin: 0 0 16px;
}

.landing-lead {
    max-width: 720px;
    margin: 0 auto 24px;
    font-size: 1.15rem;
    color: var(--muted);
}

.landing-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.landing-section {
    padding: 28px 0;
}

.landing-section > h2 {
    margin-bottom: 16px;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.landing-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.landing-card h3 {
    margin: 8px 0;
}

.landing-emoji {
    font-size: 2rem;
    line-height: 1;
}

.landing-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.landing-code {
    margin: 12px 0 0;
    padding: 12px;
    overflow-x: auto;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .85rem;
}

.landing-final {
    text-align: center;
}

.landing-banner {
    display: block;
    width: 100%;
    height: auto;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.landing-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 32px;
}

.landing-row img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.landing-row:nth-child(even) img {
    order: 2;
}

@media (max-width: 760px) {
    .landing-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .landing-row:nth-child(even) img {
        order: 0;
    }
}
