
/* Portal composition. The shared palette and primitives live in site.css. */
.portal { display: flex; flex-direction: column; }
.portal a { color: inherit; text-decoration: none; }
.portal-nav { width: 100%; min-height: 86px; padding: 15px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
.wordmark { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--plum); font-size: 1.22rem; font-weight: 750; letter-spacing: -.055em; line-height: 1; }
.wordmark span { font: italic 500 1.45rem/1 var(--accent); color: var(--mauve-deep); letter-spacing: -.06em; }
.wordmark small { font-size: .53rem; letter-spacing: .12em; margin-left: 8px; color: var(--muted); }
.nav-emblem { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; margin-right: 7px; flex: none; }
.portal-nav nav,.tools { display: flex; align-items: center; gap: clamp(12px,2vw,28px); }
.portal-nav nav a { font-size: .79rem; font-weight: 500; color: var(--muted); position: relative; padding: 13px 0; white-space: nowrap; }
.portal-nav nav a::after { content: ""; position: absolute; bottom: 3px; left: 0; right: 0; height: 1px; background: var(--plum); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.portal-nav nav a:hover,.portal-nav nav a[aria-current=page] { color: var(--plum); }
.portal-nav nav a[aria-current=page]::after,.portal-nav nav a:hover::after { transform: scaleX(1); }
.tools { gap: 10px; font-size: .78rem; }
.portal select { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--plum); padding: 11px 13px; max-width: 100%; min-height: 42px; }
.tools select { padding: 8px 6px; }
.profile-link { border: 1px solid var(--plum); border-radius: var(--radius); padding: 10px 13px; color: var(--plum); white-space: nowrap; font-weight: 600; transition: background .2s,color .2s; }
.profile-link:hover { background: var(--plum); color: var(--paper); }
.portal main { flex: 1; width: 100%; max-width: 1512px; padding: 0 var(--gutter); margin: 0 auto; }
.portal [data-view] { min-width: 0; padding: clamp(42px,6vw,84px) 0; animation: reveal .4s var(--ease) both; }
.portal h1 { font: 400 clamp(2.6rem,5.4vw,5.2rem)/1.14 var(--display); color: var(--plum); letter-spacing: -.047em; margin: 14px 0 24px; max-width: 850px; }
.portal h2 { font: 400 clamp(1.85rem,3.3vw,3.1rem)/1.24 var(--display); letter-spacing: -.035em; color: var(--plum); margin: 12px 0 20px; }
.lead { color: var(--muted); max-width: 630px; font-size: clamp(.97rem,1.4vw,1.1rem); line-height: 1.8; margin: 0; }
.hero { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items: center; gap: clamp(30px,6vw,90px); min-height: 450px; }
.hero h1 { max-width: 760px; }
.hero .eyebrow { display: flex; align-items: center; gap: 11px; }
.hero .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--mauve); flex: none; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin: 32px 0; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 19px; background: var(--plum); color: var(--surface) !important; border: 1px solid var(--plum); border-radius: var(--radius); font-size: .83rem; font-weight: 600; transition: background .2s,border-color .2s; }
.action:hover { background: var(--mauve-deep); border-color: var(--mauve-deep); }
.text-link { color: var(--plum); font-size: .84rem; font-weight: 550; border-bottom: 1px solid var(--mauve); padding-bottom: 5px; }
.text-link:hover { color: var(--mauve-deep); }
.hero-note { font-size: .73rem; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mauve-deep); flex: none; }
.brand-showcase { position: relative; isolation: isolate; background: var(--plum); color: var(--paper); padding: clamp(25px,4vw,60px); min-width: 0; aspect-ratio: 1/1.04; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.brand-showcase::before,.brand-showcase::after,.brand-halo { content: ""; position: absolute; border: 1px solid var(--champagne); border-radius: 50%; pointer-events: none; z-index: -1; }
.brand-showcase::before { width: 130%; height: 65%; left: -15%; top: -11%; transform: rotate(-35deg); opacity: .65; }
.brand-showcase::after { width: 145%; height: 90%; left: 0; top: 36%; transform: rotate(-38deg); border: 38px solid var(--plum-mid); }
.brand-halo { width: 125%; height: 65%; bottom: -12%; left: -38%; transform: rotate(-38deg); opacity: .45; }
.brand-showcase > img { display: block; position: relative; width: min(76%,310px); height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 12px 35px #1b0c2155; }
.brand-caption { position: absolute; bottom: 20px; left: 22px; right: 22px; display: flex; justify-content: space-between; gap: 10px; color: var(--rose); font-size: .61rem; font-weight: 500; letter-spacing: .15em; }
.section-heading { margin: clamp(65px,9vw,128px) 0 25px; display: flex; flex-direction: column; gap: 0; }
.section-heading p { margin: 0; }
.section-heading h2 { margin: 8px 0 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); }
.feature-grid > a { position: relative; background: var(--surface); padding: clamp(22px,3vw,37px); min-height: 240px; display: flex; flex-direction: column; align-items: flex-start; transition: background .2s; }
.feature-grid > a + a { border-left: 1px solid var(--line); }
.feature-grid > a:hover { background: #eaddd9; }
.feature-grid small,.club > small { font-size: .63rem; color: var(--mauve-deep); font-weight: 650; letter-spacing: .13em; }
.feature-grid h3 { font: 400 clamp(1.35rem,2vw,1.8rem)/1.3 var(--display); color: var(--plum); margin: 26px 0 10px; }
.feature-grid p,.club p { color: var(--muted); font-size: .88rem; line-height: 1.8; margin: 0 0 16px; }
.feature-grid a > span { margin: auto 0 0 auto; font-size: 1.35rem; color: var(--mauve-deep); transition: transform .2s; }
.feature-grid a:hover > span { transform: translate(2px,-2px); }
.manifesto { position: relative; isolation: isolate; overflow: hidden; background: var(--plum); padding: clamp(28px,6vw,72px); margin-top: clamp(45px,7vw,92px); color: var(--paper); }
.manifesto::before,.manifesto::after { content: ""; position: absolute; pointer-events: none; z-index: -1; border-radius: 50%; transform: rotate(-37deg); }
.manifesto::before { border: 1px solid var(--champagne); width: 70%; height: 190%; top: -65%; right: -29%; opacity: .65; }
.manifesto::after { border: 34px solid var(--plum-mid); width: 60%; height: 180%; top: -40%; right: -33%; }
.manifesto .eyebrow { color: var(--champagne); }
.manifesto h2 { color: var(--paper); max-width: 700px; }
.manifesto p:not(.eyebrow) { max-width: 660px; line-height: 1.85; color: var(--rose); margin-bottom: 23px; }
.manifesto .text-link { display: inline-block; color: var(--paper); border-color: var(--champagne); }
.vision-signature { width: 58px; height: auto; display: block; border-radius: 4px; margin-bottom: 22px; }
.club-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 42px; }
.club { background: var(--surface); border: 1px solid var(--line); padding: clamp(22px,3.5vw,40px); min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.club-crest { width: 100%; min-height: 225px; display: grid; place-items: center; background: var(--rose); margin-bottom: 25px; overflow: hidden; position: relative; isolation: isolate; }
.club-crest::before { content: ""; position: absolute; width: 110%; height: 62%; border: 1px solid var(--mauve); border-radius: 50%; transform: rotate(-27deg); z-index: -1; opacity: .5; }
.vision-crest { background: var(--plum); }
.vision-crest::before { border-color: var(--champagne); }
.club-crest img { width: 148px; height: 148px; object-fit: contain; position: relative; border-radius: 5px; }
.vision-crest img { width: 142px; height: auto; }
.club-crest > span { position: absolute; bottom: 12px; left: 14px; color: var(--plum); font-size: .61rem; letter-spacing: .14em; }
.vision-crest > span { color: var(--rose); }
.club h2 { font-size: clamp(1.65rem,2.6vw,2.25rem); margin-bottom: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 22px; }
.tags span { border: 1px solid var(--line); padding: 5px 9px; color: var(--mauve-deep); font-size: .72rem; }
.club-note { border-top: 1px solid var(--line); width: 100%; padding-top: 18px; }
.club .action { margin-top: auto; }
.schedule-controls { display: flex; flex-wrap: wrap; gap: 18px; margin: 30px 0 16px; }
.schedule-controls label { display: grid; gap: 6px; width: min(100%,240px); font-size: .78rem; font-weight: 600; color: var(--muted); }
.source-note { font-size: .78rem; color: var(--muted); max-width: 760px; margin: 0 0 27px; }
#lessons { border-top: 1px solid var(--line); }
#lessons > p { color: var(--muted); }
.lesson { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 20px; padding: 23px 12px; border-bottom: 1px solid var(--line); }
.lesson > strong { font: 400 1.8rem/1.2 var(--display); color: var(--mauve-deep); }
.lesson h3 { font-size: 1.12rem; margin: 0 0 8px; color: var(--plum); font-weight: 650; }
.assignment { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; max-width: 560px; margin: 5px 0; color: var(--muted); font-size: .87rem; }
.assignment b { font-weight: 600; color: var(--mauve-deep); flex: none; }
.profile-card { max-width: 650px; padding: clamp(23px,4vw,40px); border: 1px solid var(--line); background: var(--surface); }
.profile-card h2 { font-size: 2rem; margin: 16px 0 5px; }
.profile-card p { color: var(--muted); margin: 0 0 14px; }
.profile-card #avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--surface); background: var(--plum); font-size: 1.2rem; font-weight: 600; }
.profile-card .action { margin-top: 12px; }
.portal footer { width: 100%; border-top: 1px solid var(--line); padding: 24px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.portal footer p,.portal footer > a:last-child { font-size: .75rem; color: var(--muted); }
.portal footer .wordmark { font-size: 1rem; }
.portal footer .nav-emblem { width: 32px; height: 32px; }
.portal .chat-shell { max-width: 850px; }
.portal .welcome h1 { font-size: clamp(2.5rem,5vw,4.2rem); }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .portal-nav { flex-wrap: wrap; gap: 8px 16px; }
  .portal-nav nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: thin; }
  .portal-nav nav a { padding: 10px 0; }
  .wordmark small { display: none; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .brand-showcase { max-width: 520px; width: 100%; aspect-ratio: 1.45/1; }
  .brand-showcase > img { width: min(50%,235px); }
  .feature-grid,.club-grid { grid-template-columns: minmax(0,1fr); }
  .feature-grid > a { min-height: 0; }
  .feature-grid > a + a { border-left: 0; border-top: 1px solid var(--line); }
  .portal footer { flex-wrap: wrap; }
  .portal footer p { flex-basis: 100%; order: 3; margin: 0; }
}
@media (max-width: 480px) {
  .portal-nav { padding-top: 12px; padding-bottom: 8px; gap: 5px 9px; }
  .wordmark { font-size: 1.04rem; }
  .wordmark span { font-size: 1.2rem; }
  .nav-emblem { width: 32px; height: 32px; margin-right: 3px; }
  .tools { gap: 6px; font-size: .7rem; }
  .profile-link { padding: 8px; }
  .portal-nav nav { gap: 18px; }
  .portal-nav nav a { font-size: .73rem; }
  .hero .actions { gap: 15px; }
  .brand-showcase { padding: 24px; aspect-ratio: 1.25/1; }
  .brand-caption { bottom: 13px; left: 13px; right: 13px; font-size: .52rem; }
  .schedule-controls { gap: 12px; }
  .schedule-controls label { width: 100%; }
  .lesson { grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 18px 3px; }
  .assignment { align-items: flex-start; font-size: .79rem; }
  .club-crest { min-height: 190px; }
}

/* Signature portal — editorial grid, dimensional purple silk, and responsive motion. */
.reading-progress { position:fixed; top:0; left:0; width:100%; height:2px; z-index:20; transform-origin:left; transform:scaleX(0); background:linear-gradient(90deg,var(--mauve),var(--plum),var(--champagne)); pointer-events:none; }
.portal-nav { position:relative; background:#f4ebe6e8; box-shadow:0 6px 28px -20px #462b4977; z-index:3; }
.nav-emblem { border-radius:9px; box-shadow:0 4px 12px #25122e19; }
.portal-nav nav a::after { height:2px; background:linear-gradient(90deg,var(--plum),var(--mauve)); }
.profile-link { border-radius:10px; transition:background .25s,color .25s,box-shadow .25s,transform .25s; }
.profile-link:hover { box-shadow:var(--shadow-soft); transform:translateY(-2px); }
.portal select { border-radius:10px; box-shadow:0 2px 6px #25122e08; transition:border-color .25s,box-shadow .25s; }
.portal select:hover { border-color:var(--mauve); }
.portal select:focus-visible { outline:none; border-color:var(--mauve-deep); box-shadow:0 0 0 4px #7c587e20; }
.portal [data-view] { animation:rise-in .5s var(--ease) backwards; }
#home { padding-top:clamp(34px,5.5vw,76px); }
.hero { position:relative; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:clamp(35px,6vw,105px); min-height:clamp(470px,46vw,690px); }
.hero-copy { position:relative; z-index:1; }
.hero-copy::after { content:""; position:absolute; top:-50px; left:-35px; width:110px; height:110px; border:1px solid #7c587e30; border-radius:50%; transform:scaleY(.4) rotate(-42deg); z-index:-1; pointer-events:none; }
.hero-copy > .eyebrow { animation:rise-in .7s .04s var(--ease) both; }
.hero h1 { font-size:clamp(3.1rem,6.8vw,6.6rem); line-height:1.025; letter-spacing:-.055em; text-wrap:balance; margin-top:20px; margin-bottom:26px; animation:rise-in .82s .13s var(--ease) both; }
.hero .lead { animation:rise-in .75s .23s var(--ease) both; }
.hero .actions { animation:rise-in .75s .32s var(--ease) both; }
.hero-note { animation:rise-in .75s .39s var(--ease) both; }
.hero .action { min-height:55px; padding:15px 23px; font-size:.87rem; }
.text-link { position:relative; border-bottom-color:#7c587e66; transition:color .2s; }
.text-link::after { content:""; position:absolute; bottom:-1px; left:0; right:0; height:1px; background:currentColor; transform:scaleX(0); transform-origin:left; transition:transform .35s var(--ease); }
.text-link:hover::after { transform:scaleX(1); }
.brand-showcase { position:relative; aspect-ratio:1/1.05; border-radius:clamp(16px,3vw,33px); border:1px solid #7c587e; box-shadow:var(--shadow-dark),inset 0 0 0 1px #f4ebe618; perspective:900px; padding:0; animation:jewel-in .95s .13s var(--ease) both; }
.brand-showcase::before,.brand-showcase::after { display:none; }
.brand-frame { position:absolute; inset:13px; border:1px solid #d0ab904d; border-radius:inherit; pointer-events:none; }
.brand-index { position:absolute; top:28px; left:29px; color:var(--champagne); font-size:.64rem; letter-spacing:.2em; }
.brand-object { position:relative; width: min(53%,300px); transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transform-style:preserve-3d; transition:transform .45s var(--ease); border-radius:18px; }
.brand-object::before { content:""; position:absolute; inset:-11px; border:1px solid #d0ab9077; border-radius:24px; box-shadow:0 0 42px #d0ab901e; }
.brand-object img { display:block; width:100%; height:auto; border-radius:18px; border:1px solid #f4ebe655; box-shadow:0 30px 65px -18px #1b0c21c9,0 4px 14px #1b0c2166; }
.brand-caption { bottom:27px; left:29px; right:29px; color:var(--paper); font-size:.63rem; }
.section-heading { margin-top:clamp(60px,8vw,115px); position:relative; }
.section-heading::after { content:""; position:absolute; bottom:0; right:0; width:min(23%,230px); height:1px; background:linear-gradient(90deg,transparent,var(--mauve)); transform-origin:right; animation:line-grow .9s var(--ease) both; }
.feature-grid { gap:clamp(12px,1.5vw,22px); border:0; }
.feature-grid > a { border:1px solid var(--line); min-height:270px; border-radius:18px; background:var(--light-surface); box-shadow:var(--shadow-soft); isolation:isolate; overflow:hidden; transition:transform .34s var(--ease),box-shadow .34s var(--ease),border-color .34s; }
.feature-grid > a + a { border:1px solid var(--line); }
.feature-grid > a::before { content:""; position:absolute; z-index:-1; inset:0; opacity:0; background:radial-gradient(ellipse at var(--px,50%) var(--py,50%),#decbc5aa,transparent 68%); transition:opacity .3s; pointer-events:none; }
.feature-grid > a::after { content:""; position:absolute; top:-55px; right:-46px; width:145px; height:145px; border:1px solid #7c587e38; border-radius:50%; transform:scaleY(.58) rotate(-40deg); pointer-events:none; transition:transform .5s var(--ease); }
.feature-icon { width:34px; height:34px; margin-top:22px; stroke-width:1.2; color:var(--mauve-deep); }
.feature-grid h3 { margin-top:15px; }
.feature-grid a > span { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); border-radius:50%; transition:transform .3s var(--ease),color .25s,background .25s,border-color .25s; }
@media (hover:hover) and (pointer:fine) {
 .feature-grid > a:hover { background:var(--light-surface); transform:translateY(-7px); border-color:var(--mauve); box-shadow:var(--shadow-lift); }
 .feature-grid > a:hover::before { opacity:1; }
 .feature-grid > a:hover::after { transform:translate(-8px,8px) scaleY(.58) rotate(-40deg); }
 .feature-grid > a:hover > span { transform:rotate(-7deg); color:var(--paper); background:var(--plum); border-color:var(--plum); }
}
.manifesto { border-radius:24px; box-shadow:var(--shadow-dark); background:linear-gradient(125deg,var(--plum-deep),var(--plum) 55%,var(--plum-mid)); }
.manifesto::before { width:85%; height:180%; top:-52%; right:-28%; opacity:.8; }
.manifesto::after { border:48px solid #7c587e45; top:-35%; right:-29%; }
.manifesto h2 { font-size:clamp(2.2rem,4.6vw,4.65rem); max-width:760px; }
.vision-signature { border-radius:9px; box-shadow:0 7px 22px #1b0c2166; }
.await-reveal { opacity:0; transform:translateY(24px); }
.await-reveal:focus-within { opacity:1;transform:none; }
.revealed { animation:rise-in .75s var(--ease) backwards; }
.feature-grid.revealed > a { animation:rise-in .65s var(--ease) backwards; }
.feature-grid.revealed > a:nth-child(2) { animation-delay:.08s; }
.feature-grid.revealed > a:nth-child(3) { animation-delay:.16s; }
.club { border-radius:22px; background:var(--light-surface); box-shadow:var(--shadow-soft); position:relative; transition:transform .35s var(--ease),box-shadow .35s,border-color .35s; }
.club-crest { border-radius:14px; background:radial-gradient(ellipse at 35% 28%,var(--surface),var(--rose)); }
.vision-crest { background:linear-gradient(135deg,var(--plum),var(--plum-mid)); }
.club-crest::before { width:125%; height:72%; }
.club-crest img { border-radius:12px; box-shadow:0 10px 30px -9px #25122e77; transition:transform .45s var(--ease); }
.club-crest::after { content:""; position:absolute; width:130%; height:65%; border:1px solid #d0ab9088; border-radius:50%; transform:rotate(-36deg); z-index:-1; }
.tags span { border-radius:20px; background:#fff8f366; }
@media (hover:hover) and (pointer:fine) {
 .club:hover { transform:translateY(-5px); box-shadow:var(--shadow-lift); border-color:var(--mauve); }
 .club:hover .club-crest img { transform:scale(1.045); }
}
.schedule-controls { padding:18px; border:1px solid var(--line); background:var(--light-surface); border-radius:16px; box-shadow:var(--shadow-soft); width:fit-content; max-width:100%; }
#lessons { border-top:0; display:grid; gap:10px; }
.lesson { position:relative; border:1px solid var(--line); border-radius:14px; background:var(--light-surface); box-shadow:var(--shadow-soft); padding:20px 22px; overflow:hidden; animation:rise-in .42s var(--ease) backwards; transition:transform .25s var(--ease),border-color .25s,box-shadow .25s; }
.lesson::before { content:""; position:absolute; top:12px; bottom:12px; left:0; width:3px; background:linear-gradient(var(--mauve),var(--champagne)); border-radius:0 3px 3px 0; }
.lesson:nth-child(2) { animation-delay:.035s; }.lesson:nth-child(3) { animation-delay:.07s; }.lesson:nth-child(4) { animation-delay:.105s; }.lesson:nth-child(5) { animation-delay:.14s; }
.lesson>strong { font-variant-numeric:tabular-nums; align-self:start; }
.assignment b { padding:3px 10px; border-radius:20px; background:#decbc566; }
@media(hover:hover) and (pointer:fine) { .lesson:hover { transform:translateX(3px); border-color:var(--mauve); box-shadow:var(--shadow-lift); } }
.profile-card { background:var(--light-surface); border-radius:22px; box-shadow:var(--shadow-lift); position:relative; }
.profile-card #avatar { background:var(--metal); box-shadow:0 8px 22px #25122e44; }
.library-card { min-height:160px; }
.library-icon { width:37px; height:37px; color:var(--mauve-deep); margin-bottom:18px; stroke-width:1.2; }
.portal footer { background:#decbc533; }
@media (max-width:800px) {
 .hero { grid-template-columns:minmax(0,1fr); gap:30px; min-height:0; }
 .hero h1 { font-size:clamp(3rem,9vw,5rem); }
 .brand-showcase { max-width:none; aspect-ratio:1.3/1; }
 .brand-object { width:min(43%,245px); }
 .feature-grid { grid-template-columns:minmax(0,1fr); }
 .feature-grid > a { min-height:215px; }
 .section-heading::after { display:none; }
 .schedule-controls { width:100%; }
 .schedule-controls label { flex:1 1 160px; }
}
@media (max-width:480px) {
 .hero h1 { font-size:clamp(2.7rem,11vw,3.6rem); }
 .brand-showcase { aspect-ratio:1.08/1; }
 .brand-object { width:52%; }
 .brand-frame { inset:9px; }
 .brand-caption { bottom:19px;left:18px;right:18px;font-size:.56rem; }
 .brand-index { top:19px;left:18px;font-size:.55rem; }
 .hero .action { min-height:50px;padding:11px 17px; }
 .feature-grid > a { min-height:0; }
 .lesson { padding:15px 12px; }
 .assignment { flex-wrap:wrap; }
 .club-grid { gap:16px; }
 .manifesto { border-radius:18px; }
}
@media(prefers-reduced-motion:reduce) {
 .await-reveal { opacity:1; transform:none; }
 .revealed,.feature-grid.revealed > a,.hero-copy > *,.brand-showcase,.portal [data-view],.lesson { animation:none!important; }
 .brand-object,.feature-grid>a:hover,.club:hover,.lesson:hover,.profile-link:hover { transform:none!important; }
}

/* Final interaction layer. Keep entrance animations separate from hover transforms. */
.portal .action {
  border-radius:11px; background:var(--metal);
  box-shadow:0 6px 18px -7px #25122e99,inset 0 1px 0 #f4ebe630;
  transition:transform .28s var(--ease),box-shadow .28s var(--ease),border-color .28s;
}
@media (hover:hover) and (pointer:fine) {
  .portal .action:hover {
    background:var(--metal); transform:translateY(-3px);
    border-color:var(--mauve); box-shadow:0 14px 30px -12px #25122eaa,inset 0 1px 0 #f4ebe650;
  }
}
.hero-title-line,.hero-title-accent { display:block; }
.hero-title-accent {
  color:var(--mauve-deep); font-family:var(--accent); font-style:italic;
  font-size:.86em; line-height:1.18; letter-spacing:-.06em; margin-top:.07em;
}
.hero h1 { text-wrap:initial; }
.hero-title-line,.hero-title-accent { text-wrap:balance; overflow-wrap:break-word; }
.hero .actions { gap:clamp(14px,2vw,25px); }
.portal .action:focus-visible,.primary:focus-visible { outline:2px solid var(--mauve-deep); outline-offset:5px; }
@media (prefers-reduced-motion:reduce) { .portal .action:hover { transform:none!important; } }

/* Responsive composition: narrow phones, portrait tablets, landscape tablets,
   desktop and ultrawide. Preserve all Vision Signature tokens and artwork. */
:root {
  --gutter: clamp(18px,4.6vw,76px);
  --safe-left: env(safe-area-inset-left,0px);
  --safe-right: env(safe-area-inset-right,0px);
  --safe-bottom: env(safe-area-inset-bottom,0px);
}
.portal main,.portal-nav,.portal footer,.masthead,.access-shell {
  padding-left:max(var(--gutter),var(--safe-left));
  padding-right:max(var(--gutter),var(--safe-right));
}
.portal main,.hero-copy,.brand-showcase,.club,.feature-grid>a,.access-card,.institution,
.composer-foot,.group-context,.send-controls,.assignment span,.profile-card { min-width:0; }
.portal h1,.portal h2,.feature-grid h3,.club h2,.lesson h3,.profile-card h2 {
  overflow-wrap:anywhere;
}
.portal h1 { text-wrap:balance; }
.hero h1 { text-wrap:initial; }
.profile-card p,.source-note,.assignment span { overflow-wrap:anywhere; }
.nav-toggle,.portal-nav .mobile-profile { display:none; }
.nav-toggle {
  align-items:center; justify-content:center; gap:9px; min-height:44px;
  padding:8px 12px; border:1px solid var(--line); border-radius:10px;
  background:var(--light-surface); color:var(--plum); font-size:.77rem;
  font-weight:600; box-shadow:var(--shadow-soft); flex:none;
  transition:background .2s,border-color .2s;
}
.nav-toggle-icon { width:17px; height:14px; display:grid; align-content:center; gap:5px; }
.nav-toggle-icon i { height:1.5px; width:17px; background:currentColor; border-radius:1px; transition:transform .25s var(--ease); }
.nav-toggle[aria-expanded=true] { background:var(--rose); border-color:var(--mauve); }
.nav-toggle[aria-expanded=true] i:first-child { transform:translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded=true] i:last-child { transform:translateY(-3.25px) rotate(-45deg); }
.portal-nav .tools { flex-shrink:0; }
.portal-nav select,.profile-link { min-height:44px; }
.profile-link { display:inline-flex; align-items:center; }
.portal footer { padding-bottom:max(24px,calc(var(--safe-bottom) + 12px)); }
#question,#account-form input,#account-form select,.schedule-controls select { font-size:max(16px,1rem); }
.response pre,.table-frame { max-width:100%; min-width:0; }
.table-frame { overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.response table { min-width:max-content; }
.response td,.response th { max-width: min(38ch,65vw); overflow-wrap:anywhere; white-space:normal; }
#context-group { min-width:0; overflow-wrap:anywhere; }
.send-controls { flex-shrink:0; }
.send { min-height:46px; }
.in-dialog .composer-wrap { bottom:max(10px,var(--safe-bottom)); }
.keyboard-open .in-dialog .composer-wrap,.in-dialog.keyboard-open .composer-wrap { position:relative; bottom:auto; }
/* Large displays: align header and footer with the portal's editorial measure. */
@media (min-width:1513px) {
  .portal-nav,.portal footer {
    padding-left:calc((100% - 1512px)/2 + var(--gutter));
    padding-right:calc((100% - 1512px)/2 + var(--gutter));
  }
  .hero { min-height:650px; }
  .portal .chat-shell { max-width:950px; }
  #schedule #lessons { max-width:1120px; }
}
@media (min-width:1101px) and (max-width:1280px) {
  .portal-nav { gap:15px; }
  .portal-nav nav { gap:clamp(10px,1.35vw,18px); }
  .wordmark small { display:none; }
  .hero { gap:clamp(28px,4.5vw,58px); }
  .hero h1 { font-size:clamp(3.8rem,6.3vw,5.35rem); }
}
/* Landscape tablets and compact laptops: balanced two-panel hero and usable nav. */
@media (min-width:901px) and (max-width:1100px) {
  .portal-nav { min-height:108px; padding-top:12px; padding-bottom:6px; }
  .portal-nav nav { justify-content:space-between; gap:18px; }
  .portal-nav nav a { min-height:44px; display:flex; align-items:center; }
  .hero { grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:32px; min-height:420px; }
  .hero h1 { font-size:clamp(3.25rem,6.2vw,4.65rem); }
  .hero .lead { font-size:.98rem; }
  .hero .actions { gap:15px; }
  .brand-showcase { aspect-ratio:.95/1; }
  .feature-grid > a { padding:24px 20px; }
  .access-shell { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .institution { min-height:590px; padding:35px; }
  .access-card { padding:35px 27px; }
}
/* Portrait tablets: roomy reading layout, three feature cards, two community cards. */
@media (min-width:601px) and (max-width:900px) {
  .portal-nav { min-height:108px; padding-top:12px; padding-bottom:7px; }
  .portal-nav nav { justify-content:space-between; gap:14px; }
  .portal-nav nav a { min-height:44px; display:flex; align-items:center; }
  .portal [data-view] { padding:44px 0 60px; }
  .hero { grid-template-columns:minmax(0,1fr); gap:34px; min-height:0; }
  .hero h1 { font-size:clamp(3.4rem,8.3vw,5.5rem); max-width:750px; }
  .hero .lead { max-width:650px; }
  .brand-showcase { max-width:none; aspect-ratio:1.72/1; }
  .brand-object { width:min(33%,245px); }
  .feature-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  .feature-grid > a { padding:20px 15px; min-height:260px; }
  .feature-grid h3 { font-size:clamp(1.15rem,2.5vw,1.55rem); }
  .feature-grid p { font-size:.82rem; line-height:1.65; }
  .club-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .club { padding:20px; }
  .club-crest { min-height:185px; }
  .club .action { width:100%; text-align:center; }
  .schedule-controls { width:100%; }
  .schedule-controls label { flex:1 1 0; }
  .access-shell { max-width:760px; grid-template-columns:minmax(0,1fr); }
  .institution { min-height:285px; border-radius:22px 22px 0 0; }
  .access-card { border-radius:0 0 22px 22px; padding:36px; border-left:1px solid var(--line); border-top:0; }
  .institute-title h2 { font-size:4.3rem; }
  .portal footer { flex-wrap:wrap; }
}
@media (min-width:601px) and (max-width:700px) {
  .feature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .feature-grid > a:last-child { grid-column:1/-1; min-height:200px; }
  .club-grid { grid-template-columns:minmax(0,1fr); }
  .club-crest { min-height:230px; }
}
/* Touch-first mobile header. Menu stays visible if JavaScript is unavailable. */
@media (max-width:600px) {
  :root { --gutter:clamp(16px,4.5vw,24px); }
  .portal-nav {
    display:grid; grid-template-columns:minmax(0,1fr) auto;
    min-height:72px; padding-top:max(12px,env(safe-area-inset-top,0px));
    padding-bottom:12px; gap:10px 8px; align-items:center;
  }
  .portal-nav .wordmark { font-size:1.06rem; min-height:44px; gap:3px; }
  .portal-nav .wordmark span { font-size:1.2rem; }
  .portal-nav .nav-emblem { width:32px; height:32px; margin-right:3px; }
  .portal-nav .tools { grid-column:2; grid-row:1; gap:6px; }
  .portal-nav .tools select { padding:7px 3px; font-size:16px; min-width:45px; }
  .portal-nav .profile-link { display:none; }
  .portal-nav .mobile-profile { display:flex; }
  .portal-nav nav { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; width:100%; overflow:visible; padding-top:8px; border-top:1px solid var(--line); }
  .portal-nav nav a {
    display:flex; align-items:center; min-height:48px; padding:10px 12px;
    white-space:normal; overflow-wrap:anywhere; font-size:.85rem; line-height:1.35;
    border-radius:9px; border:1px solid transparent; background:#fff8f355;
  }
  .portal-nav nav a::after { display:none; }
  .portal-nav nav a[aria-current=page] { background:var(--rose); border-color:var(--line); font-weight:650; }
  .portal-nav.nav-enhanced .nav-toggle { display:inline-flex; }
  .portal-nav.nav-enhanced:not(.nav-open) nav { display:none; }
  .portal-nav.nav-enhanced.nav-open nav { animation:rise-in .23s var(--ease) backwards; }
  .portal [data-view] { padding:34px 0 48px; }
  #home { padding-top:30px; }
  .hero { gap:25px; min-height:0; grid-template-columns:minmax(0,1fr); }
  .hero-copy .eyebrow { font-size:.61rem; letter-spacing:.12em; }
  .hero h1 { font-size:clamp(2.55rem,10.4vw,4.35rem); margin:15px 0 19px; line-height:1.06; }
  .hero-title-accent { font-size:.9em; line-height:1.17; }
  .hero .lead { font-size:.98rem; line-height:1.7; }
  .hero .actions { display:flex; flex-wrap:wrap; gap:12px 16px; margin:23px 0 19px; }
  .hero .action { min-height:49px; font-size:.84rem; padding:11px 15px; }
  .hero .text-link { min-height:44px; display:inline-flex; align-items:center; padding:0; }
  .hero-note { font-size:.71rem; }
  .brand-showcase { aspect-ratio:1.18/1; max-width:none; border-radius:21px; }
  .brand-object { width:49%; max-width:230px; }
  .brand-object img { border-radius:12px; }
  .brand-object::before { inset:-7px; border-radius:17px; }
  .brand-index,.brand-caption { font-size:.57rem; letter-spacing:.12em; }
  .section-heading { margin-top:55px; }
  .portal h2 { font-size:clamp(1.8rem,6.4vw,2.6rem); }
  .feature-grid,.club-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .feature-grid > a { min-height:0; padding:22px; }
  .feature-icon { margin-top:15px; width:29px; height:29px; }
  .feature-grid h3 { font-size:1.5rem; margin-top:12px; }
  .feature-grid p,.club p { font-size:.88rem; }
  .manifesto { padding:27px 22px; margin-top:40px; }
  .manifesto h2 { font-size:clamp(2rem,7.5vw,3rem); }
  .portal footer { gap:12px; flex-wrap:wrap; }
  .portal footer .wordmark,.portal footer > a:last-child { min-height:44px; display:inline-flex; align-items:center; }
  .portal footer p { flex-basis:100%; margin:0; order:3; line-height:1.6; }
  .portal .welcome { padding:25px 19px; margin-bottom:16px; }
  .portal .welcome h1 { font-size:clamp(2.25rem,8.7vw,3.4rem); margin-bottom:0; }
  .welcome-text { max-width:100%; }
  .assistant-orbit { right:-106px; opacity:.32; }
  #composer { padding:12px; border-radius:16px; }
  .composer-foot { align-items:center; gap:9px; }
  .group-context { flex:1; gap:6px; font-size:.72rem; }
  .group-context .icon { width:15px; height:15px; }
  .send { min-width:46px; min-height:46px; padding:10px 12px; gap:7px; }
  #suggestions { grid-template-columns:minmax(0,1fr); gap:9px; }
  .suggest { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); align-items:center; min-height:65px; gap:10px; padding:13px; }
  .suggest-top { font-size:.73rem; gap:6px; }
  .suggest-text { text-align:right; margin:0; font-size:.78rem; overflow-wrap:anywhere; }
  .message { font-size:.93rem; }
  .message.user { max-width:92%; }
  .message.assistant { padding:16px 14px; }
  .response { line-height:1.7; }
  .schedule-controls { width:100%; padding:14px; gap:12px; }
  .schedule-controls label { flex:1 1 100%; width:100%; }
  .schedule-controls select { width:100%; min-height:48px; }
  .lesson { grid-template-columns:38px minmax(0,1fr); padding:16px 12px; gap:9px; }
  .lesson h3 { font-size:1rem; }
  .assignment { align-items:flex-start; flex-wrap:wrap; gap:4px 8px; font-size:.82rem; }
  .assignment b { flex-shrink:0; white-space:normal; }
  .club-grid { margin-top:25px; }
  .club { padding:20px; }
  .club .action { width:100%; }
  .profile-card { padding:22px; }
  .profile-card .action { min-height:48px; width:100%; text-align:center; }
  .access-shell { padding-top:20px; padding-bottom:max(28px,var(--safe-bottom)); min-height:0; }
  .institution { min-height:215px; padding:23px; }
  .institution-index { top:18px; left:23px; }
  .access-card { padding:25px 19px; }
  .mode-switch button { min-height:44px; }
  #account-form input,#account-form select { min-height:50px; }
  .eye { min-width:44px; min-height:44px; display:grid; place-items:center; }
}
@media (max-width:365px) {
  .portal-nav .wordmark { font-size:.95rem; }
  .portal-nav .wordmark span { font-size:1.08rem; }
  .portal-nav .nav-emblem { width:29px; height:29px; }
  .nav-toggle { width:44px; padding:0; }
  .nav-toggle-label { display:none; }
  .hero h1 { font-size:2.55rem; }
  .hero .actions { align-items:stretch; flex-direction:column; }
  .hero .actions .action { width:100%; }
  .hero .text-link { align-self:flex-start; }
  .name-row { grid-template-columns:minmax(0,1fr); gap:13px; }
  .clock { font-size:.68rem; gap:5px; }
  .masthead { gap:8px; }
  .masthead .brand span { font-size:1.1rem; }
  .masthead .brand img { width:32px; height:32px; }
  .send { padding:9px; }
  .send span { font-size:.74rem; }
  .suggest { grid-template-columns:minmax(0,1fr); gap:5px; }
  .suggest-text { text-align:left; }
}
@media (pointer:coarse) {
  .brand-object { transform:none; }
  .silk-drift { animation-duration:24s; }
  .silk-orbit { animation-duration:30s; }
  .portal .action:active,.primary:active,.suggest:active { transform:scale(.98); }
}
@media (max-height:500px) and (orientation:landscape) {
  .in-dialog .composer-wrap { position:relative; bottom:auto; }
  .portal [data-view] { padding-top:25px; }
}
@media (prefers-reduced-motion:reduce) {
  .nav-toggle-icon i,.portal-nav.nav-open nav { animation:none!important; transition:none!important; }
  .portal .action:active,.primary:active,.suggest:active { transform:none!important; }
}
