:root { color-scheme: light; font-family: system-ui, sans-serif; color: #17202a; background: #f3f6f8; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 1.5rem; }
main { width: min(100%, 38rem); min-width: 0; padding: clamp(2rem, 8vw, 5rem); background: #fff; border: 1px solid #dce4e9; border-radius: 1rem; box-shadow: 0 1rem 3rem #17202a12; }
main:has(.login-logo) { width: min(100%, 30rem); padding: clamp(2rem, 6vw, 3.5rem); background: #fff; border: 1px solid #dce4e9; border-radius: 1.25rem; box-shadow: 0 1.25rem 3rem #17202a14; }
.login-logo { display: block; width: min(100%, 17rem); height: auto; margin: 0 auto 2.25rem; }
main:has(.login-logo) h1 { margin: 0 0 1.75rem; color: #17202a; font-size: clamp(1.75rem, 5vw, 2.15rem); line-height: 1.15; text-align: center; }
main:has(.login-logo) form { display: grid; gap: 1.15rem; }
main:has(.login-logo) label { display: grid; gap: .45rem; color: #315363; font-size: .95rem; font-weight: 650; }
main:has(.login-logo) input:not([type="hidden"]) { width: 100%; min-height: 3.1rem; padding: .7rem .85rem; border: 1px solid #b9c9d1; border-radius: .55rem; background: #fff; color: #17202a; font: inherit; font-size: 1rem; transition: border-color .15s ease, box-shadow .15s ease; }
main:has(.login-logo) input:not([type="hidden"]):focus { border-color: #1769e0; outline: 3px solid #1769e033; }
main:has(.login-logo) button { width: 100%; min-height: 3.15rem; margin-top: .35rem; padding: .7rem 1rem; border: 1px solid #1559bf; border-radius: .55rem; background: #1769e0; color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
main:has(.login-logo) button:hover { background: #1559bf; }
main:has(.login-logo) button:focus-visible { outline: 3px solid #1769e066; outline-offset: 2px; }
.dashboard { width: min(100%, 78rem); min-width: 0; margin: 0 auto; padding: clamp(1rem, 4vw, 3rem); }
.dashboard .cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.dashboard .cards article { min-width: 0; padding: 1rem; border: 1px solid #dce4e9; border-radius: .75rem; background: #fff; }
.dashboard .cards p { overflow-wrap: anywhere; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.brand { display: block; min-width: 0; flex: 1 1 12rem; }
.brand-logo { display: block; width: min(100%, 18rem); height: auto; }
.brand-icon { display: none; width: 2.75rem; height: 2.75rem; }
.app-header form { flex: 0 0 auto; }
.app-header button { min-height: 2.75rem; padding: .6rem .85rem; border: 1px solid #b9c9d1; border-radius: .5rem; background: #fff; color: #315363; cursor: pointer; font: inherit; font-weight: 700; }
.app-header button:hover { border-color: #1769e0; color: #1559bf; }
.app-header button:focus-visible { outline: 3px solid #1769e066; outline-offset: 2px; }
.app-nav { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-left: auto; flex-wrap: wrap; }
.app-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .55rem .7rem; border-radius: .45rem; color: #315363; font-weight: 700; text-decoration: none; }
.app-nav a:hover, .app-nav a:focus-visible, .app-nav a[aria-current="page"] { background: #eaf2fb; color: #1559bf; }
.dashboard section { min-width: 0; margin-top: 1.5rem; padding: 1rem; border: 1px solid #dce4e9; border-radius: .75rem; background: #fff; }
.dashboard h1 { font-size: clamp(2rem, 5vw, 3rem); }
.dashboard h2 { margin-top: 0; font-size: 1.15rem; color: #315363; }
.dashboard h3 { color: #17202a; }
.dashboard dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .65rem 1rem; }
.dashboard dl div { min-width: 0; padding: .65rem; background: #f3f6f8; border-radius: .4rem; }
.dashboard dt { color: #52616b; font-size: .85rem; }
.dashboard dd { min-width: 0; margin: .2rem 0 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 700; }
.dashboard table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: .9rem; }
.dashboard th, .dashboard td { padding: .65rem; border-bottom: 1px solid #dce4e9; text-align: left; }
.dashboard th { color: #52616b; }
.accumulated-profit article { min-width: 0; }
.chart-container { position: relative; width: 100%; min-width: 0; max-width: 72rem; height: clamp(14rem, 35vw, 24rem); min-height: 14rem; }
.chart-container canvas { display: block; width: 100%; height: 100%; }
.module-operations .page-intro { max-width: 48rem; margin-bottom: 1.5rem; }
.module-operations .module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; margin-top: 1.5rem; padding: 0; border: 0; background: transparent; }
.module-card, .module-summary, .run-history, .empty-state { min-width: 0; margin-top: 0; padding: 1rem; border: 1px solid #dce4e9; border-radius: .75rem; background: #fff; }
.module-card { display: flex; flex-direction: column; }
.module-card__heading, .module-title, .run-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.module-card h2, .module-title h1, .run-card h3 { min-width: 0; overflow-wrap: anywhere; }
.module-card h2 { margin: 0; font-size: 1.15rem; }
.module-card h2 a, .back-link { color: #1559bf; text-underline-offset: .18em; }
.module-title { margin-bottom: 1.5rem; }
.module-title h1 { margin-bottom: 0; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 700; }
.module-facts, .run-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; margin: 1rem 0 0; }
.module-facts div, .run-facts div { min-width: 0; padding: .7rem; border-radius: .45rem; background: #f3f6f8; }
.module-facts dt, .run-facts dt { color: #52616b; font-size: .8rem; font-weight: 700; }
.module-facts dd, .run-facts dd { min-width: 0; margin: .25rem 0 0; overflow-wrap: anywhere; }
.module-economics--compact { margin-top: 1rem; padding: .85rem; border: 1px solid #dce4e9; border-radius: .55rem; background: #f8fafb; }
.module-economics--compact h3 { margin: 0 0 .65rem; font-size: .95rem; }
.economics-compact-list, .economics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; }
.economics-compact, .economics-card { min-width: 0; padding: .7rem; border: 1px solid #dce4e9; border-radius: .45rem; background: #fff; }
.economics-compact h4, .economics-card h3 { margin: 0; color: #315363; }
.economics-compact p { margin: .35rem 0 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.economics-empty { margin: 0; font-size: .95rem; }
.module-economics .economics-grid { margin-top: 1rem; }
.economics-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .65rem; margin: 0; }
.economics-facts dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.identity, .failure-code, .run-card h3 code { overflow-wrap: anywhere; word-break: break-word; font-size: .88em; }
.module-operations .run-history { margin-top: 1rem; }
.module-operations .module-summary { margin-top: 0; }
.run-list { display: grid; gap: .85rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.run-card { min-width: 0; padding: 1rem; border: 1px solid #dce4e9; border-radius: .65rem; background: #fff; }
.run-card h3 { margin: 0; font-size: 1rem; }
.status-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .35rem; padding: .3rem .55rem; border: 1px solid currentColor; border-radius: 999px; background: #f3f6f8; color: #315363; font-size: .78rem; font-weight: 800; line-height: 1; }
.status-badge::before { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; content: ""; }
.status-badge--active, .status-badge--succeeded { background: #e9f7ef; color: #17653a; }
.status-badge--paused, .status-badge--running { background: #fff5dd; color: #73510b; }
.status-badge--retired, .status-badge--failed { background: #fbeaea; color: #8a2525; }
.status-badge--draft, .status-badge--created { background: #eef2f5; color: #43525b; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 48rem) {
 body { padding: 1rem; }
 .dashboard { padding: 1rem 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
 .dashboard table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
 .app-header { flex-wrap: wrap; margin-bottom: 1.5rem; }
 .brand-logo { width: min(100%, 14rem); }
 .app-nav { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; }
 .module-card__heading, .module-title, .run-card__heading { flex-wrap: wrap; }
 .dashboard .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .dashboard section { margin-top: 1rem; padding: .85rem; }
 .dashboard h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
 .dashboard h2 { font-size: 1.1rem; }
 .chart-container { height: clamp(14rem, 45vw, 20rem); }
 .module-card, .module-summary, .run-history, .empty-state { padding: .85rem; }
 .module-facts, .run-facts { gap: .55rem; }
 .run-card { padding: .85rem; }
}
@media (max-width: 30rem) {
 .brand-logo { width: min(100%, 12rem); }
 .dashboard .cards { grid-template-columns: 1fr; gap: .75rem; }
 .dashboard section { padding: .75rem; }
 .dashboard h1 { font-size: clamp(1.7rem, 8vw, 2.15rem); }
 .chart-container { height: 15rem; }
}
@media (max-width: 25rem) {
 main { padding: 1.5rem 1rem; }
 .login-logo { margin-bottom: 2rem; }
}
.eyebrow { margin: 0 0 2rem; color: #4c6978; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; } h1 { margin: 0 0 .75rem; font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.05; } p:last-child { margin: 0; color: #52616b; font-size: 1.1rem; }
.public-home { width: min(100%, 62rem); padding: clamp(1.5rem, 6vw, 4.5rem); }
.public-home__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(3rem, 8vw, 6rem); }
.public-home__logo { display: block; width: min(100%, 13rem); height: auto; }
.public-home__header .eyebrow { margin: .3rem 0 0; text-align: right; }
.public-home__intro { max-width: 46rem; }
.public-home__intro h1 { margin-bottom: 1.25rem; color: #17202a; }
.public-home__intro p { max-width: 42rem; }
.public-home__products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(3rem, 8vw, 5rem); }
.public-home__products > h2 { grid-column: 1 / -1; margin: 0; color: #315363; font-size: 1.15rem; }
.public-home__product { min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid #dce4e9; border-radius: .75rem; background: #f8fafb; }
.public-home__product h3 { margin-top: 0; color: #17202a; font-size: 1.15rem; line-height: 1.25; }
.public-home__product p, .public-home__product li { color: #52616b; font-size: 1rem; line-height: 1.6; }
.public-home__product ul { padding-left: 1.2rem; }
.public-home__limitation { margin-top: 1.25rem; }
@media (max-width: 42rem) {
 .public-home__header { display: block; margin-bottom: 3rem; }
 .public-home__header .eyebrow { margin-top: 1.5rem; text-align: left; }
 .public-home__products { grid-template-columns: 1fr; }
}
