:root {
    --ink: #14212b;
    --paper: #f4f7f8;
    --card: #ffffff;
    --line: #d8e0e3;
    --blue-900: #0f2e3d;
    --blue-700: #14607e;
    --blue-500: #1c86ad;
    --teal: #2fb3a3;
    --muted: #5b6b72;
    --red: #c0392b;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 46, 61, 0.06), 0 6px 20px rgba(15, 46, 61, 0.06);
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    background-image: radial-gradient(circle at 100% 0%, rgba(28, 134, 173, 0.10), transparent 40%);
    background-attachment: fixed;
}

a {
    color: var(--blue-700);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

#site {
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- hero banner ---------- */

.hero-banner {
    position: relative;
    height: clamp(120px, 22vw, 220px);
    margin: 0 1.25em;
    border-radius: var(--radius);
    overflow: hidden;
    background-image: url("img/header-bg.4166457fec8a.jpg");
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 100%;
    box-shadow: var(--shadow);
}

.hero-banner-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0.8em 1.2em;
}

.hero-duck {
    height: clamp(70px, 14vw, 130px);
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(15, 46, 61, 0.25));
}

/* ---------- header ---------- */

#site-header {
    padding: 1.1em 1.25em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1em;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    color: var(--ink) !important;
    text-decoration: none !important;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.4em;
    width: auto;
}

.brand-name {
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2em;
    font-weight: 600;
    font-size: 0.95em;
}

#top-nav a {
    color: var(--muted);
}

#top-nav a:hover,
#top-nav a.active {
    color: var(--blue-700);
    text-decoration: none;
}

.logout-form {
    margin: 0;
    display: inline;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
}

.link-button:hover {
    color: var(--blue-700);
    background: none;
    text-decoration: underline;
}

/* ---------- content ---------- */

#site-content {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6em 1.8em 1.9em;
    margin: 0 1.25em 2em;
}

.content-heading h1 {
    margin: 0 0 0.7em;
    font-size: 1.6em;
    color: var(--blue-900);
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--teal);
    padding-bottom: 0.5em;
}

.content-body p, .content-body li {
    line-height: 1.55;
}

.lede {
    font-size: 1.1em;
    color: var(--blue-900);
}

/* ---------- footer ---------- */

#site-footer {
    text-align: center;
    padding: 1.5em;
    color: var(--muted);
    font-size: 0.85em;
}

/* ---------- cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1em;
    margin: 1.2em 0;
}

.feature-card {
    display: block;
    padding: 1.1em 1.2em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff, #f7fbfb);
    color: var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.feature-card h2 {
    margin: 0 0 0.3em;
    font-size: 1.05em;
    color: var(--blue-900);
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92em;
    line-height: 1.4;
}

/* ---------- tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

th, td {
    padding: 0.5em 0.7em;
    border-bottom: 1px solid var(--line);
}

thead th {
    background: var(--blue-900);
    color: #eafaf6;
    font-weight: 600;
    text-align: left;
}

/* ---------- forms ---------- */

form p {
    margin: 0 0 0.9em;
    display: flex;
    align-items: center;
    gap: 0.8em;
}

form p > label {
    min-width: 8.5em;
    font-weight: 600;
    font-size: 0.92em;
    color: var(--blue-900);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    font: inherit;
    padding: 0.45em 0.6em;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    min-width: 0;
    flex: 1 1 auto;
    max-width: 24em;
}

input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(28, 134, 173, 0.15);
}

button,
a.button {
    display: inline-block;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    padding: 0.55em 1.1em;
    border: none;
    border-radius: 7px;
    background: var(--blue-700);
    color: #fff;
    cursor: pointer;
    transition: background 0.12s ease;
}

button:hover,
a.button:hover {
    background: var(--blue-900);
}

/* ---------- misc ---------- */

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
    background: #eef4f5;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: var(--blue-900);
    color: #eafaf6;
    padding: 1.1em 1.3em;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.5;
}
pre code {
    background: none;
    padding: 0;
}

.warn {
    background: #fdf3e0;
    border: 1px solid #d4a72c;
    color: #6b4c00;
    padding: 0.8em 1em;
    border-radius: var(--radius);
    margin-bottom: 1em;
}

.muted {
    color: var(--muted);
    font-size: 0.9em;
}

.messages {
    margin-bottom: 1em;
}

.msg {
    padding: 0.7em 1em;
    border-radius: var(--radius);
    margin-bottom: 0.5em;
    font-size: 0.92em;
}
.msg-info, .msg-debug {
    background: #e5f2f5;
    border: 1px solid var(--blue-500);
    color: var(--blue-900);
}
.msg-success {
    background: rgba(47, 179, 163, 0.15);
    border: 1px solid var(--teal);
    color: var(--blue-900);
}
.msg-warning {
    background: #fdf3e0;
    border: 1px solid #d4a72c;
    color: #6b4c00;
}
.msg-error {
    background: #fbe2de;
    border: 1px solid var(--red);
    color: var(--red);
}

/* Django form errors: field errors sit right above their field, form-wide
   ones (nonfield) above the first field. */
.errorlist {
    list-style: none;
    margin: 0 0 0.5em;
    padding: 0;
    color: var(--red);
    font-weight: 700;
    font-size: 0.92em;
}

/* Language switcher: flags in the top right corner of the banner. The
   current language is shown with a ring; the others are buttons. */
.lang-flags {
    position: absolute;
    top: 0.7em;
    right: 0.9em;
    z-index: 2;
    margin: 0;
    display: flex;
    gap: 0.45em;
}

.lang-flag,
button.lang-flag {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 4px;
    line-height: 0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 46, 61, 0.35);
    transition: transform 0.12s ease;
}

.lang-flag img {
    display: block;
    width: 28px;
    height: 19px;
    object-fit: cover;
    border-radius: 4px;
}

button.lang-flag:hover,
button.lang-flag:focus-visible {
    background: none;
    transform: translateY(-1px);
}

button.lang-flag:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lang-flag.current {
    cursor: default;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(15, 46, 61, 0.35);
}

/* ---------- front page ---------- */

.home-lede {
    font-size: 1.35em;
    line-height: 1.4;
    color: var(--blue-900);
    font-weight: 600;
    margin: 0 0 0.4em;
    max-width: 38em;
}

.home-sub {
    color: var(--muted);
    max-width: 42em;
    margin: 0 0 1.6em;
}

.home-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2em 2em;
}

.home-lists h2 {
    font-size: 1.1em;
    color: var(--blue-900);
    margin: 0 0 0.6em;
}

.pro-list,
.con-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7em;
}

.pro-list li,
.con-list li {
    position: relative;
    padding-left: 1.7em;
}

.pro-list li::before,
.con-list li::before {
    position: absolute;
    left: 0;
    top: 0.05em;
    font-weight: 700;
}

.pro-list li::before {
    content: "✓";
    color: var(--teal);
}

/* The "doesn't do" items are deliberate, so a neutral dash rather than a red cross. */
.con-list li::before {
    content: "—";
    color: var(--muted);
}

.home-cta {
    margin-top: 2em;
    padding: 1.3em 1.5em;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(47, 179, 163, 0.14), rgba(28, 134, 173, 0.10));
    border: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

.home-cta h2 {
    margin: 0 0 0.2em;
    color: var(--blue-900);
}

.home-cta p {
    margin: 0;
    color: var(--muted);
}

.home-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8em 1.2em;
}

.home-cta .button {
    white-space: nowrap;
}

/* Help pages */
.install-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8em 1.2em;
}

.faq dt {
    font-weight: 700;
    margin-top: 1em;
}

.faq dd {
    margin: 0.3em 0 0;
    color: var(--muted);
}

.content-body pre {
    overflow-x: auto;
}
