:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: #20272c; background: #f5f7f8; font-synthesis: none; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #318a9b; outline-offset: 3px; }
.site-header { background: #fff; border-bottom: 1px solid #dfe5e9; }
.header-inner { max-width: 1104px; padding: 20px 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.brand img { display: block; flex: 0 0 44px; object-fit: contain; }
.brand-subtitle { display: block; font-size: 11px; font-weight: 400; color: #65717a; margin-top: 3px; }
.staff-link { white-space: nowrap; font-size: 13px; text-decoration: none; color: #51616c; }
.staff-link:hover { text-decoration: underline; }
.page { max-width: 1104px; padding: 34px 28px 24px; margin: auto; }
.page-heading { margin-bottom: 24px; }
.eyebrow { color: #a62731; text-transform: uppercase; font-size: 11px; font-weight: 700; }
h1 { font-size: 28px; line-height: 1.25; margin: 7px 0; font-weight: 650; overflow-wrap: anywhere; }
.subtitle { color: #65717a; margin: 0; }
.calculator { background: #fff; border: 1px solid #dce3e8; border-radius: 8px; overflow: hidden; }
.exam-bar { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e2e7ea; }
.exam-field { width: 100%; max-width: 480px; min-width: 0; }
.exam-field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
select { width: 100%; height: 44px; padding: 0 34px 0 12px; border: 1px solid #bdc9d2; border-radius: 5px; background: #fff; color: #20272c; text-overflow: ellipsis; }
.field-hint { display: block; font-size: 12px; color: #74808a; margin-top: 6px; }
.edition { font-size: 11px; color: #74808a; white-space: nowrap; }
.edition strong { display: block; font-size: 12px; font-weight: 500; color: #51616c; }
.skills-heading, .skill-row { display: grid; grid-template-columns: 1.05fr 1fr 1.45fr 1fr; gap: 20px; padding: 12px 24px; }
.skills-heading { background: #f7f9fa; color: #65717a; font-size: 11px; font-weight: 650; border-bottom: 1px solid #e5eaed; }
.skill-row { min-height: 108px; align-items: start; padding-top: 22px; padding-bottom: 22px; border-bottom: 1px solid #edf0f2; }
.skill-name { font-size: 14px; font-weight: 600; padding-top: 9px; overflow-wrap: anywhere; }
.mark-field { min-width: 0; }
.mark-input { display: flex; align-items: center; gap: 9px; }
.mark-input input { width: 86px; height: 40px; min-width: 0; border: 1px solid #bdc9d2; border-radius: 5px; padding: 8px 10px; color: #20272c; background: #fff; }
.mark-input input::placeholder { color: #939da5; }
.mark-input span { font-size: 12px; color: #74808a; white-space: nowrap; }
[aria-invalid="true"] { border-color: #c43c46 !important; background: #fff9f9 !important; }
.field-error { margin: 6px 0 0; color: #b42b36; font-size: 12px; }
.form-error { margin: 16px 24px; color: #b42b36; }
.mobile-label { display: none; }
.skill-output, .cefr-output { min-width: 0; }
.scale-score { display: block; font-size: 26px; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; }
.result-status { display: block; margin-top: 3px; font-size: 11px; color: #6b7882; }
.status-reference, .status-capped { color: #267059; }
.status-below { color: #946018; }
.status-invalid { color: #b42b36; }
.pending-value { display: block; padding-top: 8px; color: #a4adb4; }
.cefr-tag { display: inline-block; font-size: 14px; font-weight: 650; color: #28675c; background: #edf6f2; border-radius: 3px; padding: 4px 10px; margin-top: 3px; }
.boundary { display: block; font-size: 10px; line-height: 1.4; color: #805b13; margin-top: 7px; }
.calculation-detail { margin-top: 7px; font-size: 11px; color: #65717a; }
.calculation-detail summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.calculation-detail p { overflow-wrap: anywhere; margin-bottom: 0; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.primary-actions { display: flex; align-items: center; gap: 10px; }
.button { min-height: 40px; padding: 9px 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: none; background: transparent; white-space: nowrap; }
.button-primary { background: #ca343f; border-color: #ca343f; color: #fff; }
.button-primary:hover { background: #b52a34; }
.button-reset { color: #596872; background: #f3f5f7; }
.button-reset:hover { background: #e9edf0; }
.input-note { font-size: 11px; color: #74808a; text-align: right; }
.overall { background: #eef6f4; border-top: 1px solid #d7e8e3; padding: 24px; }
.overall-main { display: flex; justify-content: space-between; align-items: start; gap: 28px; }
.overall-label { display: block; font-size: 12px; font-weight: 500; color: #4f7268; }
#overall-score { display: block; font-size: 42px; line-height: 1.2; font-weight: 650; color: #204f43; margin-top: 5px; }
.overall-cefr { text-align: right; }
.overall-cefr strong { display: block; color: #204f43; font-size: 28px; line-height: 1.4; margin-top: 5px; }
.overall-method { margin-top: 14px; font-size: 12px; color: #4e6d64; }
.overall-method summary { cursor: pointer; }
.overall-method p { margin: 8px 0 0; }
.overall-message { margin: 8px 0 0; font-size: 14px; color: #345f53; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button-outline { background: #fff; border: 1px solid #c6dcd4; color: #345f53; min-height: 36px; padding: 7px 12px; font-weight: 500; font-size: 12px; }
.button-outline:hover { background: #f8fbfa; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.copy-status { font-size: 12px; color: #345f53; }
.stale-message { padding: 16px 24px; margin: 0; border-top: 1px solid #ecdeb9; color: #805b13; background: #fcf8ed; font-size: 12px; }
.practice-note { font-size: 11px; color: #74808a; margin: 14px 0 24px; }
.reference { border-top: 1px solid #dce3e8; border-bottom: 1px solid #dce3e8; }
.reference > summary { cursor: pointer; padding: 18px 0; font-size: 13px; font-weight: 600; }
.reference > summary > span { color: #74808a; font-size: 12px; font-weight: 400; margin-left: 8px; }
.reference-content { padding: 0 0 16px; font-size: 12px; color: #65717a; }
.reference-content p { max-width: 850px; }
.reference-content a { color: #2c6c7c; }
.reference-table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
caption { text-align: left; color: #51616c; margin-bottom: 12px; }
th, td { text-align: left; border-bottom: 1px solid #dfe5e9; padding: 10px; }
thead th { font-weight: 600; background: #edf1f4; color: #43545e; }
tbody th { font-weight: 500; }
.reference-points span { display: inline-block; margin: 0 16px 2px 0; white-space: nowrap; }
.page-footer { margin-top: 20px; display: flex; justify-content: space-between; gap: 20px; font-size: 10px; color: #849099; }
@media (max-width: 720px) {
    .header-inner { padding: 16px 20px; }
    .page { padding: 26px 20px 20px; }
    h1 { font-size: 25px; }
    .edition { display: none; }
    .exam-bar { padding: 20px; }
    .exam-field { max-width: none; }
    .skills-heading { display: none; }
    .skill-row { grid-template-columns: 1fr 1fr; gap: 16px 20px; padding: 20px; }
    .skill-name { font-size: 15px; }
    .mark-field { justify-self: end; }
    .mark-input input { width: 84px; }
    .mark-input span { min-width: 30px; }
    .skill-output, .cefr-output { padding-top: 0; }
    .mobile-label { display: block; color: #849099; font-size: 10px; margin-bottom: 5px; }
    .scale-score { font-size: 24px; }
    .pending-value { padding-top: 0; }
    .cefr-tag { margin-top: 0; }
    .form-actions { padding: 20px; flex-wrap: wrap; }
    .input-note { text-align: left; font-size: 10px; }
    .overall { padding: 20px; }
    .overall-main { gap: 16px; }
    .overall-label { font-size: 11px; }
    #overall-score { font-size: 36px; }
    .overall-cefr strong { font-size: 25px; }
    .page-footer { flex-wrap: wrap; gap: 8px; }
    .reference-points { min-width: 200px; }
}
@media (max-width: 370px) {
    .brand { font-size: 15px; gap: 8px; }
    .brand-subtitle { font-size: 10px; }
    .brand img { width: 36px; height: 36px; flex-basis: 36px; }
    .staff-link { font-size: 12px; }
    .header-inner, .page { padding-left: 14px; padding-right: 14px; }
    .overall-main { flex-wrap: wrap; }
    .overall-cefr { text-align: left; }
}
@media print {
    :root, body { background: #fff; color: #000; }
    .site-header { border-bottom: 1px solid #bbb; }
    .page { max-width: none; padding-top: 18px; }
    .header-inner { max-width: none; }
    .staff-link, .form-actions, .result-actions, .reference, .stale-message, .eyebrow, .field-hint, .calculation-detail, .overall-method { display: none !important; }
    .calculator { overflow: visible; }
    .exam-bar { padding: 14px 20px; }
    .skills-heading, .skill-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr; padding: 12px 20px; }
    .mobile-label { display: none; }
    .skill-row { min-height: 80px; break-inside: avoid; }
    .mark-field { justify-self: start; }
    select, .mark-input input { appearance: none; border: 0; padding: 0; color: #000; background: #fff; }
    input::-webkit-inner-spin-button { display: none; }
    .overall { break-inside: avoid; border-top: 1px solid #bbb; background: #f5f5f5; }
    .overall-main { flex-wrap: nowrap; }
    .overall-cefr { text-align: right; }
    .practice-note, .page-footer { color: #333; }
    .page-heading { margin-bottom: 16px; }
    h1 { font-size: 24px; }
}
