:root {
    color-scheme: light;
    /* Neutral surfaces and a single blue accent keep starter defaults easy to adapt. */
    --page: #f5f5f5;
    --surface: #ffffff;
    --surface-hover: #f8f8f8;
    --ink: #222222;
    --muted: #666666;
    --line: #dddddd;
    --line-hover: #bdbdbd;
    --primary: #1a5fb4;
    --primary-dark: #154a8a;
    --accent: var(--primary);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
}

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

/* Ordinary links lose their underline on hover; navigation has its own feedback. */
a:hover {
    text-decoration: none;
}

.site {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@supports (min-height: 100dvh) {
    body,
    .site {
        min-height: 100dvh;
    }
}

.site-header,
.site-footer {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-footer {
    border-top: 1px solid var(--line);
}

.bar,
.content,
.footer-inner {
    width: min(100% - 32px, 1040px);
    margin: 0 auto;
}

.bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.brand:hover,
.brand:focus {
    text-decoration: underline;
}

.nav {
    display: flex;
    align-items: center;
    /* Both controls already include space around their icons for tapping. */
    gap: 5px;
    color: var(--muted);
    font-size: 0.95rem;
}

.account-link {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.account-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    object-fit: cover;
}

/* Both the guest Log In label and the signed-in name belong to this link. */
.account-link:hover > span,
.account-link:focus > span {
    text-decoration: underline;
}

.content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: 22px;
    padding: 20px 0 40px;
}

.primary-content,
.sidebar {
    align-self: start;
}

.sidebar {
    order: -1;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: var(--surface-hover);
}

.menu-toggle-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.panel {
    width: 100%;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(32, 32, 32, 0.08);
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
}

.side-nav-link:hover,
.side-nav-link:focus {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.62);
}

.side-nav-link.active {
    border-color: var(--line);
    background: var(--surface);
    color: var(--primary-dark);
    box-shadow: 0 10px 28px rgba(32, 32, 32, 0.06);
}

.side-nav-link.active:hover,
.side-nav-link.active:focus {
    border-color: var(--line-hover);
    background: var(--surface-hover);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.04;
    font-weight: 850;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0;
}

p {
    max-width: 64ch;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.65;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

button {
    font: inherit;
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus {
    background: var(--primary-dark);
}

.button.secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.button.secondary:hover,
.button.secondary:focus {
    border-color: var(--line-hover);
    background: var(--surface-hover);
}

.meta {
    display: grid;
    gap: 10px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.meta p {
    margin: 0;
    font-size: 0.98rem;
}

.footer-inner {
    padding: 22px 0;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 0.92rem;
}

.footer-brand {
    color: var(--muted);
    font-weight: 400;
    text-decoration: none;
}

.footer-brand:hover,
.footer-brand:focus {
    text-decoration: underline;
}

/* Mobile is the complete base layout. Navigation stays usable without JS. */
.primary-content, .bar > *, .nav { min-width: 0; }
.panel, .brand, .meta, .account-email { overflow-wrap: anywhere; }
.account-email { display: none; }
.js .menu-toggle { display: inline-flex; }
.js .side-nav { display: none; }
.js .sidebar.menu-open .side-nav { display: grid; }
.footer-inner { flex-wrap: wrap; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 8px; z-index: 1; }

@media (min-width: 48rem) {
    .content { gap: 40px; padding: 72px 0; }
    .content-with-sidebar { grid-template-columns: minmax(0, 1fr) 240px; }
    .sidebar { order: 0; padding-top: 4px; }
    .js .menu-toggle { display: none; }
    .js .side-nav { display: grid; }
    .account-email { display: inline; }
    .panel { padding: 40px; }
    h1 { font-size: 3rem; }
}

/* Site Info and Remember Me remain starter capabilities. */
.info-sections {
    display: grid;
    gap: 28px;
    margin-top: 32px;
}

.info-section {
    display: grid;
    gap: 14px;
}

.info-table {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    border-spacing: 0;
    background: #ffffff;
    overflow: hidden;
}

.info-table th,
.info-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.info-table tr:first-child th,
.info-table tr:first-child td {
    border-top: 0;
}

.info-table th {
    width: 1%;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.info-table td {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.check-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--ink);
    font-weight: 700;
}

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

@media (max-width: 47.99rem) {
    .info-table th, .info-table td { display: block; width: auto; white-space: normal; }
    .info-table td { border-top: 0; padding-top: 0; }
}
