:root {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #25221e;
    background: #f5f2ed;
    --ink: #25221e;
    --muted: #57534e;
    --accent: #e5a045;
    --line: #ddd3c5;
    --radius: 1.5rem;
    --gutter: clamp(1rem, 3.4vw, 3.6rem);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid #a85f14;
    outline-offset: 4px;
}
.frame {
    width: min(100%, 110rem);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.top { background: #fff; }
.top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: clamp(5.1rem, 8vw, 8.3rem);
    padding-block: .65rem;
}
.brand {
    display: block;
    flex: 0 0 auto;
    width: clamp(7rem, 12vw, 11.3rem);
    overflow: hidden;
}
.brand img {
    display: block;
    width: 132%;
    height: auto;
    margin: -10% -16%;
}
.top-details { text-align: end; min-width: 0; }
.portal-label {
    margin: 0;
    font-size: clamp(.68rem, 1.42vw, 1.4rem);
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.account {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .22rem 1rem;
    margin-top: .4rem;
    font-size: .83rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.account a, .recover { font-weight: 650; text-underline-offset: .22em; }
.dashboard, .login { padding-block: clamp(1rem, 2.2vw, 2.4rem) 1.5rem; }
.dark-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    background: radial-gradient(ellipse at 100% 100%, #493829, transparent 53%), #24211e;
}
.dark-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-radial-gradient(circle at 100% 167%,
        transparent 0 4.1rem, #e5a045a3 4.12rem 4.19rem, transparent 4.21rem 4.65rem);
    mask-image: linear-gradient(to right, transparent 48%, #000 80%);
}
.dark-panel .eyebrow { color: var(--accent); }
.eyebrow {
    margin: 0 0 .85rem;
    font-size: clamp(.77rem, 1.36vw, 1.24rem);
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.dark-panel h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5.2vw, 5.4rem);
    font-weight: 790;
    line-height: 1.03;
    letter-spacing: -.057em;
}
.banner { padding: clamp(1.6rem, 3.5vw, 3.65rem) clamp(1.3rem, 4vw, 4.4rem); }
.banner > p:last-child, .hero-content > p:last-child {
    margin: .8rem 0 0;
    font-size: clamp(1rem, 1.7vw, 1.7rem);
    line-height: 1.5;
    color: #f0ece7;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1.15rem;
    margin: clamp(1rem, 1.6vw, 1.65rem) 0 1.5rem;
}
.app-card, .form-card, .empty {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.app-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(1.4rem, 3.15vw, 3.45rem);
    text-decoration: none;
    transition: border-color .16s, box-shadow .16s;
}
.app-card:hover { border-color: #c68a47; box-shadow: 0 .5rem 1.5rem #38251512; }
.app-mark {
    width: clamp(3rem, 5.2vw, 5.4rem);
    aspect-ratio: 1;
    margin-bottom: .55rem;
    color: #d89138;
}
.app-mark svg, .app-mark img { display: block; width: 100%; height: 100%; }
.app-mark svg { stroke: currentColor; stroke-width: 4.3; stroke-linecap: round; stroke-linejoin: round; }
.app-mark img { object-fit: contain; }
.app-card .eyebrow { color: #4d4944; margin-bottom: .55rem; }
.app-card h2 {
    margin: 0;
    font-size: clamp(1.65rem, 2.9vw, 3rem);
    line-height: 1.07;
    letter-spacing: -.045em;
}
.app-card > p:not(.eyebrow) {
    color: var(--muted);
    font-size: clamp(1rem, 1.31vw, 1.32rem);
    line-height: 1.5;
    margin: auto 0 0;
    padding-block: .75rem clamp(1.3rem, 2.4vw, 2.5rem);
}
.primary {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.05rem;
    padding: .75rem 1.1rem;
    border: 0;
    border-radius: .66rem;
    background: var(--ink);
    color: #fff;
    font: inherit;
    font-weight: 730;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
.primary span { font-size: 1.3em; line-height: 1; }
.primary:hover, .app-card:hover .primary { background: #4b3929; }
.dashboard footer, .hero-footer, .empty { color: var(--muted); font-size: .88rem; }
.empty { padding: 1.4rem; margin: 0; }
.login {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    gap: clamp(1rem, 1.6vw, 1.65rem);
}
.hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.6rem, 4vw, 4.4rem);
}
.hero h1 { max-width: 13ch; }
.hero-content > p:last-child { max-width: 34ch; }
.hero-footer { margin: 0; color: #e8dfd5; letter-spacing: .09em; text-transform: uppercase; }
.form-card { height: 100%; padding: clamp(1.4rem, 3.4vw, 3.8rem); }
.form-card h2 { font-size: clamp(1.85rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -.045em; margin: 0; }
.form-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.form-card form { margin-top: 1.5rem; }
.form-card label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 680; }
.form-card input {
    width: 100%;
    min-height: 3rem;
    border: 1px solid #a89c8e;
    border-radius: .6rem;
    margin-bottom: 1rem;
    padding: .65rem .8rem;
    font: inherit;
    color: var(--ink);
}
.form-card .primary { width: 100%; margin-top: .25rem; }
.recover { display: inline-block; margin-top: 1.15rem; font-size: .88rem; }
.form-card .error { padding: .75rem; background: #fff0e3; color: #792d17; border-radius: .5rem; }
@media (max-width: 740px) {
    .login { grid-template-columns: 1fr; }
    .hero { gap: 1.2rem; }
    .hero h1 { max-width: none; }
}
@media (max-width: 440px) {
    :root { --radius: 1.1rem; }
    .top-inner { gap: .6rem; }
    .portal-label { letter-spacing: .095em; }
    .account { gap: .22rem .6rem; }
    .account span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .app-card { transition: none; }
}
