@layer components {
.up-portal {--up-border:#dce4d9;--up-soft:#f3f6ef;--up-ink:#204f3e;}
.up-portal .page-intro {padding-bottom:34px!important;}
.up-subject-grid,.up-unit-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:17px;margin-top:20px;}
.up-subject-card,.up-unit-card,.up-exam-card {display:flex;flex-direction:column;gap:13px;text-decoration:none;color:var(--ink);padding:27px;background:#fffefa;border:1px solid var(--up-border);border-radius:14px;min-height:195px;transition:transform .2s,border-color .2s,box-shadow .2s;}
.up-subject-card:hover,.up-unit-card:hover,.up-exam-card:hover{transform:translateY(-3px);border-color:#8aaa8f;box-shadow:0 10px 28px #163d3210;}
.up-featured,.up-exam-card{background:linear-gradient(140deg,#f6faf4,#eaf4e7);}
.up-muted,.up-unit-planned{background:#f8f9f5;}
.up-subject-card h2,.up-unit-card h2,.up-exam-card h2{font:normal clamp(24px,2.7vw,34px)/1.17 var(--serif);letter-spacing:-.02em;}
.up-subject-card p,.up-unit-card p,.up-exam-card p{color:var(--body);font-size:13px;line-height:1.75;}
.up-mini{font-size:10px;font-weight:720;letter-spacing:.12em;color:#608575;}
.up-card-footer{margin-top:auto;font-size:12px;font-weight:700;color:var(--up-ink);padding-top:10px;}
.up-exam-card{max-width:760px;min-height:240px;}
.up-disclaimer{font-size:12px;line-height:1.8;max-width:900px;color:var(--body);margin-top:25px;}
.up-stats{display:flex;flex-wrap:wrap;gap:23px;padding:24px 0;border-block:1px solid var(--up-border);}
.up-stats>div{display:flex;align-items:baseline;gap:10px;min-width:165px;flex:1;}
.up-stats strong{font:normal 34px var(--serif);color:var(--up-ink);}
.up-stats span{font-size:12px;color:var(--body);}
.up-guidance{background:var(--up-soft);border-left:3px solid #82a78b;border-radius:0 10px 10px 0;padding:19px 23px;line-height:1.7;font-size:13px;}
.up-guidance p{color:var(--body);margin-top:5px;}
.up-end-guidance{margin-top:34px;}
.up-jump{display:flex;flex-wrap:wrap;gap:9px;margin:27px 0;}
.up-jump a{border:1px solid var(--up-border);background:#fffefa;border-radius:30px;padding:9px 13px;text-decoration:none;color:var(--up-ink);font-size:11px;}
.up-sections{display:grid;gap:20px;}
.up-section{border:1px solid var(--up-border);border-radius:13px;overflow:hidden;background:#fffefa;scroll-margin-top:30px;}
.up-section-head{padding:22px 25px;background:#f7f9f4;display:flex;justify-content:space-between;align-items:center;gap:18px;border-bottom:1px solid var(--up-border);}
.up-section-head h2{font:normal clamp(23px,2.5vw,30px) var(--serif);margin-top:8px;}
.up-section-head h2 a{text-decoration:none;color:var(--up-ink);}
.up-small-action,.up-simple-link{font-size:12px;font-weight:700;color:var(--up-ink);text-decoration:none;}
.up-note-list{display:grid;}
.up-note-row{display:grid;grid-template-columns:50px minmax(0,1fr) auto 16px;align-items:center;gap:14px;border-bottom:1px solid #e7ebe3;padding:15px 20px;text-decoration:none;color:var(--ink);}
.up-note-row:last-child{border-bottom:none;}
.up-note-row:hover{background:#f5f8f2;}
.up-note-code{font:700 12px monospace;color:#587f67;}
.up-note-title{font-size:13px;line-height:1.5;font-weight:600;}
.up-note-state{font-size:10px;color:#708173;white-space:nowrap;}
.up-chevron{color:#6b8f79;}
.up-standalone-list{border:1px solid var(--up-border);border-radius:13px;overflow:hidden;}
.up-simple-link{display:inline-block;margin-top:25px;}
.up-note-article{max-width:850px;background:#fffefa;border:1px solid var(--up-border);padding:clamp(20px,3vw,40px);border-radius:14px;}
.up-note-label{font-size:11px;letter-spacing:.07em;color:#50735d;font-weight:700;}
.up-note-article h2{font:normal 28px var(--serif);margin:26px 0 10px;}
.up-note-article>p{font-size:15px;line-height:1.9;}
.up-note-article .up-guidance{margin-top:25px;}
.up-note-adjacent{display:flex;justify-content:space-between;flex-wrap:wrap;gap:20px;margin-top:28px;}
.up-note-adjacent a{font-size:12px;color:var(--up-ink);max-width:45%;line-height:1.6;}
@media(max-width:650px){.up-portal .page-intro h1{font-size:clamp(40px,11vw,64px)!important}.up-section-head{padding:18px;flex-wrap:wrap}.up-note-row{grid-template-columns:38px minmax(0,1fr) 16px;gap:8px;padding:13px 12px}.up-note-state{grid-column:2;grid-row:2;white-space:normal}.up-chevron{grid-column:3;grid-row:1}.up-note-adjacent a{max-width:100%;}}
}
@layer responsive {
.up-subject-card h2,.up-unit-card h2{font:700 clamp(20px,2.3vw,27px)/1.24 var(--sans);letter-spacing:-.025em;color:#183b32;}
.up-portal .science-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;border:1px solid currentColor;background:#e8efdf;color:#365f40}
.up-portal .science-icon svg{width:27px;height:27px}
.up-portal .tone-green{background:#e7f0df;color:#37613f;border-color:#cedec5}
.up-portal .tone-teal{background:#e0efeb;color:#236760;border-color:#c4ded6}
.up-portal .tone-amber{background:#f5ebd8;color:#8a5d23;border-color:#e9d6b5}
.up-portal .tone-violet{background:#ede8f5;color:#65468a;border-color:#ded3ef}
.up-portal .tone-rose{background:#f7e6e7;color:#954b56;border-color:#ebcdd0}
.up-portal .tone-blue{background:#e5edf6;color:#395e8e;border-color:#cdddeb}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
.up-portal .science-icon{transition:transform .18s ease,box-shadow .18s ease}
.up-portal a:hover .science-icon{transform:translateY(-2px) scale(1.05);box-shadow:0 4px 14px #183c3214}
}
}

/* Science collection — tactile, restrained illustration tiles. */
@layer responsive {
  .directory-card, .up-subject-card, .up-unit-card{
    --science-accent:#37613f;--science-tint:#e7f0df;--science-edge:#cedec5;
    position:relative;isolation:isolate;
    border-radius:20px;
    background:linear-gradient(150deg,#fffefa 4%,#f7f9f3 75%,var(--science-tint) 150%);
    border:1px solid #dce4d8;
    box-shadow:0 3px 10px #233e2810;
  }
  .directory-card:has(.tone-teal),.up-subject-card:has(.tone-teal),.up-unit-card:has(.tone-teal){--science-accent:#236760;--science-tint:#e0efeb;--science-edge:#c4ded6}
  .directory-card:has(.tone-amber),.up-subject-card:has(.tone-amber),.up-unit-card:has(.tone-amber){--science-accent:#8a5d23;--science-tint:#f5ebd8;--science-edge:#e9d6b5}
  .directory-card:has(.tone-violet),.up-subject-card:has(.tone-violet),.up-unit-card:has(.tone-violet){--science-accent:#65468a;--science-tint:#ede8f5;--science-edge:#ded3ef}
  .directory-card:has(.tone-rose),.up-subject-card:has(.tone-rose),.up-unit-card:has(.tone-rose){--science-accent:#954b56;--science-tint:#f7e6e7;--science-edge:#ebcdd0}
  .directory-card:has(.tone-blue),.up-subject-card:has(.tone-blue),.up-unit-card:has(.tone-blue){--science-accent:#395e8e;--science-tint:#e5edf6;--science-edge:#cdddeb}
  .directory-card .science-icon,.up-portal .science-icon{
    flex:none;position:relative;overflow:hidden;isolation:isolate;
    width:60px;height:60px;border-radius:18px;
    background:linear-gradient(145deg,#ffffffc9,var(--science-tint));
    color:var(--science-accent);border-color:var(--science-edge);
    box-shadow:inset 0 1px 0 #fff,0 3px 8px #223b3010;
  }
  .directory-card .science-icon::before,.up-portal .science-icon::before{
    content:"";position:absolute;z-index:-1;width:54px;height:54px;border-radius:50%;
    border:1px solid currentColor;opacity:.07;top:-23px;right:-21px;box-shadow:0 0 0 7px currentColor;
  }
  .directory-card .science-icon svg,.up-portal .science-icon svg{width:33px;height:33px;overflow:visible}
  .directory-card .eyebrow,.up-subject-card .up-mini,.up-unit-card .up-mini{color:var(--science-accent);font-weight:650;letter-spacing:.055em}
  .directory-card h3,.up-subject-card h2,.up-unit-card h2{font-weight:750;line-height:1.2;letter-spacing:-.028em}
  .directory-card .text-link{color:var(--science-accent)}
  .directory-card:focus-visible,.up-subject-card:focus-visible,.up-unit-card:focus-visible{outline:3px solid var(--science-accent);outline-offset:3px}
  @media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
    .directory-card,.up-subject-card,.up-unit-card{transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease}
    .directory-card:hover,.up-subject-card:hover,.up-unit-card:hover{transform:translateY(-3px);border-color:var(--science-accent);box-shadow:0 14px 34px #183c3215}
    .directory-card:hover .science-icon,.up-portal a:hover .science-icon{transform:translateY(-2px) rotate(-3deg) scale(1.045);box-shadow:0 5px 16px #183c321c}
  }
  @media (max-width:600px){
    .directory-card .science-icon,.up-portal .science-icon{width:54px;height:54px;border-radius:15px}
    .directory-card .science-icon svg,.up-portal .science-icon svg{width:30px;height:30px}
  }
  @media (prefers-reduced-motion:reduce){.directory-card,.up-subject-card,.up-unit-card,.science-icon{transition:none!important;transform:none!important}}
}
