/* Lokalny Rajdhani (SIL OFL 1.1); źródła i licencja: fonts/rajdhani/. */
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/rajdhani/rajdhani-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Invest Home: firmowa zieleń, grafit i jaśniejszy akcent; reszta to paleta portalu. */
    --ih-primary: #317b5a;
    --ih-primary-dark: #245c43;
    --ih-secondary: #2b2d37;
    --ih-accent: #319c32;
    --ih-background: #f4f7f5;
    --ih-surface: #ffffff;
    --ih-surface-soft: #eaf3ed;
    --ih-text: #2b2d37;
    --ih-muted: #59665e;
    --ih-border: #d5dfd8;
    --ih-table-border: #b7cbbf;
    --ih-table-section-border: #bfd3c6;
    --ih-input-border: #819287;
    --ih-danger: #a13131;
    --ih-danger-background: #fff3f2;
    --ih-danger-border: #e2bbb8;
    --ih-success: #245c43;
    --ih-focus: #245c43;
    --ih-radius: .4rem;
    --ih-shadow: 0 2px 12px rgb(43 45 55 / 4%);
    --ih-weight-light: 400;
    --ih-weight-body: 500;
    --ih-weight-heading: 600;
    --ih-weight-strong: 700;
    color-scheme: light;
    font-weight: var(--ih-weight-body);
    font-family: "Rajdhani", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ih-text);
    background: var(--ih-background);
    line-height: 1.45;
}

* { box-sizing: border-box; }
body { font-size: .9375rem; margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
a { color: var(--ih-primary-dark); text-underline-offset: .2em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: var(--ih-weight-heading); line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: clamp(1.5rem, 4vw, 1.75rem); font-weight: var(--ih-weight-heading); }
h2 { font-size: 1.375rem; }
p + p { margin-top: .375rem; }

.site-header { background: var(--ih-surface); border-top: 2px solid var(--ih-accent); border-bottom: 1px solid var(--ih-border); }
.header-content, .site-footer { width: min(100% - 3rem, 68rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.header-content { min-height: 4.5rem; padding-block: .75rem; }
.brand { display: inline-flex; flex-direction: column; color: var(--ih-primary); text-decoration: none; flex-shrink: 0; }
.brand-name { font-size: 1.5rem; font-weight: var(--ih-weight-strong); line-height: 1.2; letter-spacing: -.04em; }
.brand-company { color: var(--ih-muted); font-size: .8rem; font-weight: var(--ih-weight-heading); letter-spacing: .06em; }
.service-label { color: var(--ih-muted); font-size: .9rem; max-width: 20rem; }
.page-shell { flex: 1; width: min(100% - 3rem, 68rem); margin: 1.75rem auto 3rem; min-width: 0; overflow-wrap: anywhere; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.eyebrow { color: var(--ih-primary-dark); font-size: .75rem; font-weight: var(--ih-weight-strong); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .65rem; }
.site-footer { padding-block: 1.25rem; border-top: 1px solid var(--ih-border); color: var(--ih-muted); font-size: .8rem; }
.site-footer span:first-child { font-weight: var(--ih-weight-heading); }

button, input, select { font: inherit; }
strong, b { font-weight: var(--ih-weight-strong); }
.service-label, .selection-help, .intro, .site-footer { font-weight: var(--ih-weight-light); }
button { font-size: .875rem; min-height: 2.75rem; padding: .5rem 1.5rem; border: 1px solid var(--ih-primary); border-radius: var(--ih-radius); background: var(--ih-primary); color: var(--ih-surface); font-weight: var(--ih-weight-strong); cursor: pointer; }
button:hover { background: var(--ih-primary-dark); border-color: var(--ih-primary-dark); }
.button-secondary { background: var(--ih-surface); color: var(--ih-primary-dark); border-color: var(--ih-input-border); }
.button-secondary:hover { background: var(--ih-surface-soft); border-color: var(--ih-primary); }
:focus-visible { outline: 3px solid var(--ih-focus); outline-offset: 4px; }
#main-content:focus { outline: none; }

.contract-card, .login-panel { background: var(--ih-surface); border: 1px solid var(--ih-border); border-radius: var(--ih-radius); padding: 1.25rem 1.75rem; box-shadow: var(--ih-shadow); min-width: 0; overflow-wrap: anywhere; }
.page-heading h1 { font-size: .875rem; font-weight: var(--ih-weight-heading); color: var(--ih-muted); letter-spacing: 0; }
.account-panel { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ih-border); }
.account-name { font-size: .9375rem; line-height: 1.4; font-weight: var(--ih-weight-heading); }
.account-code { color: var(--ih-muted); font-size: .875rem; }
.account-code span { color: var(--ih-text); font-variant-numeric: tabular-nums; }
.account-address { color: var(--ih-muted); font-size: .9375rem; }
.contract-selection { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contract-selection[hidden] { display: none; }
.contract-choice { flex: 1; min-width: 0; }
.contract-choice label { display: block; font-size: .875rem; font-weight: var(--ih-weight-heading); margin-bottom: .375rem; }
.contract-choice select { font-size: .875rem; display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--ih-input-border); border-radius: var(--ih-radius); background: var(--ih-surface); color: var(--ih-text); }
.contract-selection button { margin-top: calc(.875rem * 1.45 + .375rem); flex-shrink: 0; }
.selection-help { margin-top: .375rem; font-size: .8125rem; color: var(--ih-muted); }
.contract-card h2 { color: var(--ih-muted); font-size: .875rem; font-weight: var(--ih-weight-heading); letter-spacing: 0; margin-bottom: .75rem; }
.contract-address { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: var(--ih-weight-heading); line-height: 1.35; color: var(--ih-primary-dark); }
.contract-symbol { margin-top: .5rem; font-size: .9375rem; font-weight: var(--ih-weight-heading); }
.contract-symbol span { display: block; font-size: .8125rem; color: var(--ih-muted); font-weight: var(--ih-weight-light); }
.contract-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--ih-border); }
.contract-fields:empty { display: none; }
.contract-fields dt { color: var(--ih-muted); font-size: .8125rem; }
.contract-fields dd { margin: .25rem 0 0; font-variant-numeric: tabular-nums; }
.contract-provider { grid-column: 1 / -1; }
.notice { padding: 1.125rem 1.5rem; border: 1px solid var(--ih-border); border-left: 4px solid var(--ih-primary); border-radius: var(--ih-radius); background: var(--ih-surface); }
.notice[role="status"] { background: var(--ih-surface-soft); }
.notice-error { background: var(--ih-danger-background); border-color: var(--ih-danger-border); border-left-color: var(--ih-danger); color: var(--ih-danger); }

.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); align-items: center; gap: clamp(2rem, 6vw, 6rem); max-width: 65rem; margin: 3rem auto; }
.login-introduction { max-width: 29rem; }
.welcome-title { font-size: clamp(1.5rem, 4vw, 1.75rem); font-weight: var(--ih-weight-heading); line-height: 1.25; letter-spacing: -.04em; margin: .75rem 0 1rem; }
.intro { color: var(--ih-muted); }
.login-panel { padding: 1.5rem 2.25rem; border-top: 4px solid var(--ih-primary); }
.login-panel .intro { margin: .5rem 0 1.25rem; }
.login-panel .notice { margin-bottom: 1.5rem; padding: 1rem; }
.login-form { display: grid; gap: .375rem; }
.login-form label { font-weight: var(--ih-weight-heading); font-size: .875rem; }
.login-form input:not([type="hidden"]) { width: 100%; min-width: 0; min-height: 2.75rem; border: 1px solid var(--ih-input-border); border-radius: var(--ih-radius); padding: .5rem .85rem; background: var(--ih-surface); color: var(--ih-text); margin-bottom: .75rem; }
.login-form button { margin-top: .5rem; width: 100%; }
.skip-link { position: absolute; top: -10rem; left: 1rem; padding: .65rem 1rem; background: var(--ih-surface); z-index: 1; }
.skip-link:focus { top: .6rem; }

@media (max-width: 50rem) {
    .login-layout { grid-template-columns: minmax(0, 1fr); max-width: 29rem; gap: 1.75rem; margin-block: 1rem; }
    .login-introduction .welcome-title { margin-block: .75rem; }
}
@media (max-width: 36rem) {
    .header-content, .page-shell, .site-footer { width: calc(100% - 2rem); }
    .header-content { gap: .65rem 1.5rem; }
    .service-label { font-size: .8rem; max-width: 11rem; }
    .page-shell { margin-block: 1.75rem 2.5rem; }
    .page-heading { flex-wrap: wrap; }
    .login-form input:not([type="hidden"]) { font-size: 1rem; }
    .contract-card, .login-panel { padding: 1rem 1.25rem; }
    .contract-selection { flex-direction: column; gap: .75rem; }
    .contract-choice { width: 100%; }
    .contract-selection button { margin-top: 0; width: 100%; }
    .site-footer { gap: .4rem 1rem; }
}
@media (max-width: 24rem) {
    .contract-fields { grid-template-columns: minmax(0, 1fr); }
    .service-label { max-width: none; }
}
@media (forced-colors: active) {
    button, .account-panel, .contract-card, .login-panel, .notice { border: 1px solid CanvasText; }
    :focus-visible { outline-color: Highlight; }
}

/* Portal danych: wspólne menu i zwarte zestawienia, bez zmiany skali brandingu. */
.portal-layout { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.portal-content { min-width: 0; }
.portal-menu { background: var(--ih-surface); border: 1px solid var(--ih-border); border-radius: var(--ih-radius); padding: .375rem; }
.portal-menu summary { cursor: pointer; min-height: 2.75rem; padding: .6rem; font-weight: var(--ih-weight-strong); }
.portal-menu nav { display: grid; gap: .125rem; }
.portal-menu button, .portal-menu a { display: block; width: 100%; min-height: 2.75rem; padding: .5rem .65rem; text-align: left; font-size: .875rem; text-decoration: none; font-weight: var(--ih-weight-heading); background: transparent; color: var(--ih-text); border: 1px solid transparent; border-radius: var(--ih-radius); }
.portal-menu [aria-current="page"] { background: var(--ih-surface-soft); border-left: 3px solid var(--ih-primary); font-weight: var(--ih-weight-strong); }
.portal-menu button:hover, .portal-menu a:hover { background: var(--ih-surface-soft); }
.screen-title { font-size: 1.5rem; margin-bottom: .625rem; }
.portal-content .account-panel { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem 1rem; margin-bottom: .75rem; padding-bottom: .625rem; }
.portal-content .account-panel p { margin: 0; }
.portal-content .contract-selection { max-width: 43rem; gap: .625rem; margin-bottom: .75rem; }
.portal-content .selection-help { font-size: .8125rem; }
.portal-content .contract-card { padding: .875rem 1rem; }
.portal-content .contract-address { font-size: 1.125rem; }
.portal-content .contract-symbol { margin-top: .125rem; }
.portal-content .contract-symbol span { display: inline; margin-right: .375rem; }
.portal-content .contract-fields { gap: .5rem 1.25rem; margin-top: .75rem; padding-top: .625rem; }
.portal-content .notice { padding: .75rem 1rem; margin-top: .75rem; }
.period-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem .75rem; margin-bottom: .75rem; }
.period-toolbar[hidden] { display: none; }
.year-month-selector { border: 0; padding: 0; margin: 0; min-width: 0; }
.year-month-selector legend { font-size: .8125rem; font-weight: var(--ih-weight-heading); margin-bottom: .25rem; }
.year-month-fields { display: flex; gap: .5rem; }
.year-month-fields > div { display: grid; gap: .25rem; min-width: 0; }
.period-toolbar label { font-size: .8125rem; font-weight: var(--ih-weight-heading); }
.period-toolbar select { width: 8rem; max-width: 100%; min-height: 2.75rem; padding: .375rem .5rem; border: 1px solid var(--ih-input-border); border-radius: var(--ih-radius); background: var(--ih-surface); color: var(--ih-text); font-size: .875rem; }
.year-month-fields > div:first-child select { width: 5.5rem; }
.financial-heading { margin-block: 1rem .5rem; }
.portal-content .financial-heading h2 { font-size: 1.125rem; color: var(--ih-text); margin-bottom: .25rem; }
.financial-heading p, .financial-note { font-size: .8125rem; color: var(--ih-muted); }
.financial-note { margin-top: .625rem; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--ih-table-border); border-radius: var(--ih-radius); }
.finance-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.4; }
.finance-table caption { text-align: left; padding: .375rem .5rem; color: var(--ih-muted); font-size: .8125rem; }
.finance-table th, .finance-table td { text-align: left; padding: .375rem .5rem; border-bottom: 1px solid var(--ih-border); vertical-align: top; }
.finance-table th { font-weight: var(--ih-weight-heading); }
.ledger-table thead th:nth-child(3) { font-weight: var(--ih-weight-body); }
.finance-table thead { background: var(--ih-background); }
.finance-table thead th { border-bottom: 2px solid var(--ih-table-section-border); }
.finance-table .month-start > td,
.finance-table tbody + tbody .ledger-group > th,
.finance-table tfoot > tr > th,
.finance-table tfoot > tr > td { border-top: 2px solid var(--ih-table-section-border); }
.finance-table > :last-child > tr:last-child > th,
.finance-table > :last-child > tr:last-child > td { border-bottom: 0; }
.finance-table .number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.finance-table .date { white-space: nowrap; }
.finance-table .period-value, .finance-table .balance-value { font-weight: var(--ih-weight-strong); }
.finance-table .ledger-group { background: var(--ih-surface-soft); color: var(--ih-primary-dark); }
.finance-table .opening-row { background: var(--ih-background); }
.finance-table .operation-description { min-width: 10rem; max-width: 24rem; overflow-wrap: anywhere; }
.ledger-table { min-width: 47rem; }
.balance-table { min-width: 43rem; }

@media (max-width: 63.999rem) {
    .portal-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .portal-menu nav { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
}
@media (max-width: 36rem) {
    .portal-content .contract-selection button { width: auto; }
    .period-toolbar { gap: .5rem; }
    .year-month-selector { flex: 1 1 14rem; }
    .year-month-fields > div { flex: 1; }
    .period-toolbar select, .year-month-fields > div:first-child select { width: 100%; }
    .portal-content .contract-card { padding: .75rem; }
    .page-shell:has(.portal-layout) { margin-top: .75rem; }
}
