* { box-sizing: border-box; }
:root {
  --ink: #202b37;
  --blue: #0067a8;
  --purple: #351044;
  --paper: #fbf8f6;
  --border: #d6d7d9;
  --muted: #58616a;
}
html, body { margin: 0; min-height: 100%; font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; }
button, input { font: inherit; }

/* ID-porten method-selection screen */
.portal-page { background: #f3f4f6; color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
.portal-header { height: 53px; background: white; border-bottom: 1px solid #d7d7d7; display: flex; align-items: center; justify-content: space-between; padding: 0 max(7.4%, 24px); }
.brand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 17px; color: #28313b; }
.brand-mark { width: 17px; height: 17px; border: 3px solid #006ab0; border-right-color: transparent; border-radius: 50% 0 0 50%; display: inline-block; }
.language { background: none; border: 0; color: #3e4650; font-size: 12px; display: flex; gap: 9px; align-items: center; }
.portal-main { flex: 1; padding: 33px 16px 90px; }
.method-panel { width: min(402px, 100%); margin: 0 auto; border: 1px solid #d1d3d6; border-radius: 5px 5px 0 0; background: #fff; overflow: hidden; }
.panel-top { padding: 22px 17px; height: 56px; font-size: 11px; color: #6e747a; border-bottom: 1px solid #d1d3d6; }
.method-panel h1 { font-size: 13px; font-weight: 600; margin: 0; padding: 17px; border-bottom: 1px solid #d1d3d6; }
.tabs { display: flex; height: 39px; border-bottom: 1px solid #d1d3d6; font-size: 12px; }
.tab { padding: 11px 16px 8px; white-space: nowrap; }
.tab.active { color: #315c91; border-bottom: 3px solid #1262a0; }
.method { min-height: 62px; display: grid; grid-template-columns: 64px 1fr 18px; gap: 8px; align-items: center; padding: 9px 17px; border-bottom: 1px solid #e0e1e3; text-decoration: none; color: #303943; }
.method:hover { background: #f7f9fb; }
.method strong, .method small { display: block; }
.method strong { font-size: 11px; margin-bottom: 4px; }
.method small { color: #5f6871; font-size: 11px; line-height: 1.25; }
.method b { font-size: 24px; font-weight: 400; color: #66717b; }
.mini-logo { color: #0069a9; font-size: 24px; }
.bank-logo { color: #351044; font-weight: 700; font-size: 17px; letter-spacing: -.4px; text-align: center; }
.method .bank-logo { color: white; background: #351044; border-radius: 3px; font-size: 11px; padding: 13px 3px; }
.buy-logo { color: white; background: #142c58; font-size: 11px; font-weight: 700; text-align: center; padding: 13px 2px; }
.comm-logo { color: #668087; font-size: 9px; text-align: center; letter-spacing: 1px; }
.help-link { display: block; padding: 18px 22px; font-size: 11px; color: #315c91; }
.portal-footer { background: #1e2c3d; color: #f4f6f8; padding: 48px max(7.4%, 24px) 36px; display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 32px; font-size: 12px; }
.footer-brand { color: white; }
.brand-mark.light { border-color: white; border-right-color: transparent; }
.portal-footer p { color: #d3d9df; line-height: 1.5; font-size: 11px; }
.portal-footer strong { display: block; margin-bottom: 14px; }
.portal-footer a:not(.brand) { display: block; margin: 11px 0; text-decoration: none; color: #e1e5e9; }

/* BankID screens */
.bank-page { min-height: 100vh; background: var(--paper); color: #15191b; display: flex; justify-content: center; align-items: center; padding: 32px 20px; }
.bank-content { width: min(306px, 100%); text-align: center; }
.bank-logo { color: var(--purple); font-weight: 700; font-size: 20px; margin-bottom: 48px; }
.bank-logo.large { font-size: 18px; margin-bottom: 46px; }
.bank-content h1, .code-card h1 { font-size: 24px; margin: 0 0 12px; font-weight: 700; }
.subtitle { margin: 0; color: #5c6064; font-size: 16px; }
.bank-form { margin-top: 25px; text-align: left; }
.bank-form > label:first-child, .code-form > label:first-child { display: block; font-size: 16px; font-weight: 600; margin-bottom: 7px; }
.bank-form > input, .code-form > input { display: block; width: 100%; height: 54px; border: 2px solid #202020; border-radius: 13px; background: white; padding: 0 14px; outline-offset: 3px; }
.remember { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #4e5052; font-size: 16px; }
.remember input { appearance: none; width: 18px; height: 18px; border: 1px solid #858585; border-radius: 4px; background: white; margin: 0; flex: 0 0 18px; }
.remember input:checked { background: var(--purple); box-shadow: inset 0 0 0 4px white; }
.primary-button { margin-top: 47px; width: 100%; min-height: 56px; border: 0; border-radius: 30px; background: var(--purple); color: white; font-weight: 700; cursor: pointer; }
.cancel { display: block; margin-top: 25px; text-decoration: none; color: var(--purple); font-size: 16px; }
.privacy { display: inline-block; margin-top: 42px; color: #4e6543; font-size: 14px; text-decoration: underline; }
.demo-note { font-size: 11px; line-height: 1.4; color: #747474; margin: 7px 0 0; }
.code-card { width: min(450px, 100%); min-height: 520px; border: 1px solid #dedbd8; border-radius: 17px; padding: 20px 64px 26px; text-align: center; }
.code-card .bank-logo { margin: 0 0 22px; }
.code-card h1 { font-size: 26px; margin-bottom: 9px; }
.code-form { text-align: left; margin-top: 57px; }
.code-form > label:first-child { font-size: 20px; white-space: nowrap; }
.question { display: inline-flex; width: 19px; height: 19px; align-items: center; justify-content: center; border: 2px solid #351044; border-radius: 50%; font-size: 13px; margin-left: 3px; }
.code-form > input { height: 49px; border-radius: 8px; }
.code-hint { font-size: 14px; color: #55595d; margin: 10px 0 0; }
.next-button { display: block; margin: 105px auto 0; border: 0; border-radius: 24px; padding: 12px 28px; min-width: 112px; background: #fbf8f6; color: #16191c; font-size: 18px; cursor: pointer; }
.code-card .cancel { font-size: 14px; color: #5c5c5c; text-decoration: underline; margin-top: 10px; }

@media (max-width: 640px) {
  .portal-header { padding: 0 18px; }
  .portal-main { padding-top: 24px; }
  .portal-footer { grid-template-columns: 1fr; gap: 22px; padding: 30px 24px; }
  .bank-page { align-items: flex-start; padding-top: 70px; }
  .bank-logo.large { margin-bottom: 35px; }
  .code-card { padding: 22px 24px; min-height: 0; }
  .code-form { margin-top: 42px; }
  .code-form > label:first-child { white-space: normal; font-size: 17px; }
  .next-button { margin-top: 65px; }
}
