:root {
    color-scheme: light;
    --orange: #ff7a18;
    --orange-dark: #d8560b;
    --orange-soft: #fff0e4;
    --ink: #211a28;
    --ink-soft: #403447;
    --muted: #6f6577;
    --line: #e8e2eb;
    --canvas: #f7f4f8;
    --surface: #ffffff;
    --green: #15815a;
    --red: #b73939;
    --shadow: 0 18px 55px rgba(40, 26, 48, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 93% 3%, rgba(255, 122, 24, .11), transparent 25rem),
        linear-gradient(180deg, #faf8fb, var(--canvas));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
a { color: inherit; }
button, input { font: inherit; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    color: #fff;
    background: rgba(33, 26, 40, .97);
    box-shadow: 0 10px 30px rgba(18, 12, 22, .2);
    backdrop-filter: blur(14px);
}
.site-nav__inner {
    width: min(1180px, calc(100% - 2rem));
    min-height: 72px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .72rem; color: #fff; text-decoration: none; }
.brand__mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 13px 13px 13px 4px;
    color: #fff;
    background: linear-gradient(145deg, var(--orange), #a53b08);
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(255, 122, 24, .24);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; line-height: 1.1; letter-spacing: .01em; }
.brand small { margin-top: .16rem; color: #cfc5d4; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.site-nav__links, .site-nav__account { display: flex; align-items: center; gap: .25rem; }
.site-nav__links a { padding: .62rem .78rem; border-radius: .65rem; color: #eee8f1; font-size: .88rem; font-weight: 680; text-decoration: none; }
.site-nav__links a:hover, .site-nav__links a:focus-visible { background: rgba(255,255,255,.1); outline: none; }
.site-nav__account { gap: .7rem; color: #ddd4e1; font-size: .86rem; }
.site-nav__account form { margin: 0; }
.link-button { padding: .4rem; border: 0; color: #ffc79f; background: transparent; font-weight: 750; cursor: pointer; }
.nav-toggle { display: none; padding: .55rem .7rem; border: 1px solid rgba(255,255,255,.25); border-radius: .6rem; color: #fff; background: transparent; }

.site-shell { width: min(1180px, calc(100% - 2rem)); margin: auto; padding: 2rem 0 5rem; }
.panel { border: 1px solid rgba(232, 226, 235, .95); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 .45rem; color: var(--orange-dark); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .5fr); gap: 1rem; margin-bottom: 1rem; }
.hero__main {
    position: relative;
    min-height: 275px;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(128deg, #211a28 0%, #3f2947 62%, #55333e 100%);
}
.hero__main::after {
    content: "";
    position: absolute;
    width: 390px;
    height: 390px;
    right: -150px;
    top: -145px;
    border: 44px solid rgba(255,122,24,.28);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255,122,24,.12), 0 0 0 82px rgba(255,122,24,.06);
}
.hero__main > * { position: relative; z-index: 1; }
.hero h1 { max-width: 720px; margin: .2rem 0 .75rem; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .98; letter-spacing: -.045em; }
.hero__main p:not(.eyebrow) { max-width: 620px; margin: 0; color: #ded6e2; font-size: 1rem; }
.trust-badge { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.35rem; padding: .55rem .75rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); font-size: .78rem; font-weight: 750; }
.trust-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #49d49d; box-shadow: 0 0 0 4px rgba(73,212,157,.14); }
.hero__status { padding: 1.35rem; display: flex; flex-direction: column; justify-content: space-between; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(21,129,90,.12); }
.status-dot.is-stale { background: #c28124; box-shadow: 0 0 0 5px rgba(194,129,36,.12); }
.server-availability { margin: 1.1rem 0 .25rem; color: var(--ink-soft); font-size: 1rem; font-weight: 720; }
.sync-note { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

.character-bar { margin-bottom: 1rem; padding: .9rem; display: flex; align-items: center; gap: .7rem; overflow-x: auto; }
.character-bar__label { flex: 0 0 auto; padding: 0 .25rem; color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.character-chip { flex: 0 0 auto; padding: .62rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font-size: .84rem; font-weight: 750; text-decoration: none; }
.character-chip.is-active { border-color: var(--orange); color: #fff; background: var(--orange); }
.character-add { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border: 1px dashed var(--orange); border-radius: 50%; color: var(--orange-dark); background: var(--orange-soft); font-size: 1.3rem; font-weight: 750; text-decoration: none; }
.character-add:hover, .character-add:focus-visible { color: #fff; background: var(--orange); outline: none; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-bottom: 1rem; }
.summary-card { padding: 1.15rem; color: inherit; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.summary-card:hover, .summary-card:focus-visible { border-color: rgba(255,122,24,.55); box-shadow: 0 20px 58px rgba(40,26,48,.13); outline: none; transform: translateY(-2px); }
.summary-card__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.summary-card__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--orange-dark); background: var(--orange-soft); font-weight: 900; }
.summary-card__value { display: block; margin-top: .8rem; font-size: 1.55rem; font-weight: 850; letter-spacing: -.03em; }
.summary-card__label { color: var(--muted); font-size: .78rem; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 1rem; }
.stack { display: grid; gap: 1rem; align-content: start; }
.section-card { padding: 1.25rem; scroll-margin-top: 95px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin: 0; }
.section-card > summary.section-heading { cursor: pointer; list-style: none; }
.section-card > summary.section-heading::-webkit-details-marker { display: none; }
.section-card > summary.section-heading > div { min-width: 0; }
.section-card > summary.section-heading::after { content: "+"; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--orange-dark); background: var(--orange-soft); font-weight: 850; transition: transform .18s ease; }
.section-card[open] > summary.section-heading { margin-bottom: 1rem; }
.section-card[open] > summary.section-heading::after { transform: rotate(45deg); }
.section-card > summary.section-heading:focus-visible { border-radius: 8px; outline: 3px solid rgba(255,122,24,.2); outline-offset: 5px; }
.section-heading h2 { margin: 0; font-size: 1.08rem; }
.section-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .82rem; }
.section-count { margin-left: auto; padding: .3rem .58rem; border-radius: 999px; color: var(--orange-dark); background: var(--orange-soft); font-size: .72rem; font-weight: 800; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.profile-item { padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfbfc; }
.profile-item span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.profile-item strong { display: block; margin-top: .25rem; font-size: .94rem; }
.profile-subsection { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile-subsection__heading { margin-bottom: .7rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.profile-subsection__heading h3 { margin: 0; font-size: .92rem; }
.profile-subsection__heading span { color: var(--muted); font-size: .74rem; font-weight: 720; }
.profile-subsection > .muted { margin: 0; font-size: .82rem; }
.employment-list { display: grid; gap: .55rem; }
.employment-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfbfc; }
.employment-row strong, .employment-row small { display: block; }
.employment-row small { margin-top: .12rem; color: var(--muted); font-size: .75rem; }
.employment-row > span { flex: 0 0 auto; color: var(--orange-dark); font-size: .73rem; font-weight: 780; text-align: right; }

.asset-list { display: grid; gap: .7rem; }
.asset-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; }
.asset-row__mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: var(--orange-dark); background: var(--orange-soft); font-size: .78rem; font-weight: 900; }
.asset-row strong, .asset-row small { display: block; }
.asset-row small { margin-top: .15rem; color: var(--muted); }
.asset-row__meta { text-align: right; font-size: .78rem; }
.asset-row__meta strong { color: var(--ink-soft); }

.skill-list { display: grid; gap: .85rem; }
.skill-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fcfbfc; }
.skill-card summary { display: grid; grid-template-columns: minmax(0,1fr) auto 24px; align-items: center; gap: .8rem; padding: .9rem; cursor: pointer; list-style: none; }
.skill-card summary::-webkit-details-marker { display: none; }
.skill-card summary span { color: var(--orange-dark); font-size: .76rem; font-weight: 760; text-align: right; }
.skill-card summary::after { content: "+"; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--orange-dark); background: var(--orange-soft); font-weight: 850; transition: transform .18s ease; }
.skill-card[open] summary::after { transform: rotate(45deg); }
.skill-card summary:focus-visible { outline: 3px solid rgba(255,122,24,.2); outline-offset: -3px; }
.skill-card__body { padding: 0 .9rem .9rem; }
.skill-top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; font-size: .85rem; }
.skill-top span { color: var(--muted); }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #eee9f0; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #ffab5e); }
.progress-track .p-0 { width: 0; }
.progress-track .p-5 { width: 5%; }
.progress-track .p-10 { width: 10%; }
.progress-track .p-15 { width: 15%; }
.progress-track .p-20 { width: 20%; }
.progress-track .p-25 { width: 25%; }
.progress-track .p-30 { width: 30%; }
.progress-track .p-35 { width: 35%; }
.progress-track .p-40 { width: 40%; }
.progress-track .p-45 { width: 45%; }
.progress-track .p-50 { width: 50%; }
.progress-track .p-55 { width: 55%; }
.progress-track .p-60 { width: 60%; }
.progress-track .p-65 { width: 65%; }
.progress-track .p-70 { width: 70%; }
.progress-track .p-75 { width: 75%; }
.progress-track .p-80 { width: 80%; }
.progress-track .p-85 { width: 85%; }
.progress-track .p-90 { width: 90%; }
.progress-track .p-95 { width: 95%; }
.progress-track .p-100 { width: 100%; }

.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag { padding: .42rem .58rem; border: 1px solid var(--line); border-radius: 8px; background: #fcfbfc; font-size: .78rem; font-weight: 680; }
.tag.is-inactive { color: var(--muted); text-decoration: line-through; }
.bill { padding: .8rem 0; border-top: 1px solid var(--line); }
.bill:first-of-type { padding-top: 0; border-top: 0; }
.bill__top { display: flex; justify-content: space-between; gap: 1rem; }
.bill p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }

.empty-state { padding: 2rem 1rem; text-align: center; }
.empty-state > span { width: 48px; height: 48px; margin: auto; display: grid; place-items: center; border-radius: 14px; color: var(--orange-dark); background: var(--orange-soft); font-weight: 900; }
.empty-state h3 { margin: .8rem 0 .3rem; font-size: 1rem; }
.empty-state p { max-width: 390px; margin: auto; color: var(--muted); font-size: .82rem; }

.login-shell { width: min(960px, calc(100% - 2rem)); min-height: calc(100vh - 72px); margin: auto; padding: 7vh 0; display: grid; place-items: center; }
.login-card { width: 100%; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; }
.login-brand { position: relative; min-height: 480px; padding: clamp(1.8rem, 5vw, 3.3rem); overflow: hidden; color: #fff; background: linear-gradient(135deg, #211a28, #4a2f4e); }
.login-brand::after { content: ""; position: absolute; width: 380px; height: 380px; right: -180px; bottom: -170px; border: 50px solid rgba(255,122,24,.28); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,122,24,.1); }
.login-brand > * { position: relative; z-index: 1; }
.login-brand h1 { max-width: 420px; margin: 5rem 0 .8rem; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: .98; letter-spacing: -.045em; }
.login-brand p { max-width: 420px; color: #ddd4e1; }
.login-form { padding: clamp(1.8rem, 5vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0; font-size: 1.5rem; }
.login-form > p { margin: .5rem 0 1.4rem; color: var(--muted); }
.login-form label { margin: .7rem 0 .38rem; font-size: .82rem; font-weight: 800; }
.login-form input:not([type="hidden"]) { width: 100%; min-height: 46px; padding: .68rem .78rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.login-form input:focus { border-color: var(--orange); outline: 4px solid rgba(255,122,24,.12); }
.login-form small { margin: -.1rem 0 .15rem; color: var(--muted); font-size: .72rem; }
.login-form .button { margin-top: 1.1rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .72rem 1rem; border: 0; border-radius: 11px; color: #fff; background: var(--orange); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--orange-dark); }
.auth-switch { margin: 1rem 0 0 !important; font-size: .82rem; text-align: center; }
.auth-switch a { color: var(--orange-dark); font-weight: 800; }
.privacy-note { margin-top: 1.2rem; padding: .85rem; border-radius: 11px; color: var(--ink-soft); background: #f4f0f5; font-size: .76rem; }
.alert { margin-bottom: 1rem; padding: .8rem .9rem; border-radius: 10px; color: #8e2f2f; background: #ffeded; font-size: .82rem; }
.alert--success { color: #126342; background: #e2f7ed; }

.onboarding-card { max-width: 760px; margin: 1.5rem auto 0; padding: clamp(1.6rem, 5vw, 3rem); text-align: center; }
.onboarding-card__mark { width: 58px; height: 58px; margin: 0 auto 1.1rem; display: grid; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(145deg, var(--orange), var(--orange-dark)); font-size: 1.8rem; box-shadow: 0 12px 28px rgba(255,122,24,.22); }
.onboarding-card h2 { margin: .2rem 0 .65rem; font-size: clamp(1.55rem,4vw,2.2rem); letter-spacing: -.03em; }
.onboarding-card > p:not(.eyebrow) { max-width: 580px; margin: 0 auto 1.3rem; color: var(--muted); }
.onboarding-card code, .link-card code { padding: .12rem .34rem; border-radius: 5px; color: var(--ink); background: #eee9f0; font-weight: 800; }

.link-shell { width: min(960px, calc(100% - 2rem)); min-height: calc(100vh - 72px); margin: auto; padding: 7vh 0; display: grid; place-items: center; }
.link-card { width: 100%; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; }
.link-card__intro { padding: clamp(1.6rem,5vw,3rem); color: #fff; background: linear-gradient(135deg,#211a28,#482d4d); }
.link-card__intro .eyebrow { color: #ffb47c; }
.link-card__intro h1 { margin: .2rem 0 .7rem; font-size: clamp(2rem,5vw,3rem); line-height: 1; letter-spacing: -.04em; }
.link-card__intro > p:not(.eyebrow) { color: #ddd4e1; }
.link-steps { margin: 2rem 0 0; padding: 0; display: grid; gap: .75rem; list-style: none; }
.link-steps li { display: flex; align-items: center; gap: .7rem; color: #eee8f1; }
.link-steps span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: rgba(255,122,24,.28); font-size: .78rem; font-weight: 850; }
.link-form { padding: clamp(1.6rem,5vw,3rem); display: flex; flex-direction: column; justify-content: center; }
.link-form label { margin-bottom: .45rem; font-size: .82rem; font-weight: 800; }
.code-input { width: 100%; min-height: 58px; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font: 800 1.4rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.code-input:focus { border-color: var(--orange); outline: 4px solid rgba(255,122,24,.13); }
.code-command { margin-top: .75rem; font-size: clamp(.95rem,3vw,1.35rem); letter-spacing: .06em; }
.link-form > p { margin: .6rem 0 1.1rem; color: var(--muted); font-size: .78rem; }
.link-form h2 { margin: .15rem 0 .45rem; }
.link-form form { display: grid; }
.cancel-link { margin-top: .9rem; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; }

.prose { max-width: 800px; }
.prose h1 { margin-bottom: .4rem; font-size: clamp(2rem,5vw,3rem); letter-spacing: -.04em; }
.prose h2 { margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose code { padding: .12rem .3rem; border-radius: 5px; background: #eee9f0; }

.site-footer { width: min(1180px, calc(100% - 2rem)); margin: auto; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); font-size: .78rem; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { color: var(--ink); }
.site-footer p { max-width: 500px; margin: 0; text-align: right; }

@media (max-width: 900px) {
    .site-nav__links { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-nav.is-open .site-nav__inner { flex-wrap: wrap; padding: .7rem 0; }
    .site-nav.is-open .site-nav__links { order: 3; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hero, .content-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 650px) {
    .site-nav__inner, .site-shell, .site-footer { width: min(100% - 1.15rem, 1180px); }
    .site-nav__account > span { display: none; }
    .login-card { grid-template-columns: 1fr; }
    .link-card { grid-template-columns: 1fr; }
    .login-brand { min-height: 330px; }
    .login-brand h1 { margin-top: 2.2rem; }
    .summary-grid, .profile-grid { grid-template-columns: 1fr; }
    .asset-row { grid-template-columns: 42px minmax(0,1fr); }
    .asset-row__meta { grid-column: 2; text-align: left; }
    .employment-row { align-items: flex-start; }
    .skill-card summary { grid-template-columns: minmax(0,1fr) 24px; }
    .skill-card summary span { grid-column: 1; grid-row: 2; text-align: left; }
    .skill-card summary::after { grid-column: 2; grid-row: 1 / span 2; }
    .site-footer { flex-direction: column; gap: .5rem; }
    .site-footer p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
