/* One student layout language. Opt-in page primitives are shared by the
   static home and React tools. Reading papers, feedback and modal contents
   deliberately keep their own type sizes, colors and geometry. */
:is(.sg-internal-shell,.study-app){--sg-page-width:1280px;--sg-page-gutter:30px;--sg-page-top:25px;--sg-page-gap:20px;--sg-panel-radius:8px;--sg-control-radius:6px;--sg-title-size:28px;--sg-copy-size:14px;--sg-label-size:12px}
.study-app{--sg-bg:var(--study-bg);--sg-surface:var(--study-surface);--sg-soft:var(--study-soft);--sg-ink:var(--study-ink);--sg-muted:var(--study-muted);--sg-line:var(--study-line);--sg-link:var(--study-link);--sg-accent:var(--study-action);--sg-accent-text:var(--study-action-text)}
/* The same width and spacing as Início, with no extra masthead per tool. */
html .sg-internal-shell{--sg-sidebar-width:254px}
html .sg-internal-shell .sg-workspace-top{min-height:68px;padding:12px var(--sg-page-gutter);gap:14px}
html .sg-internal-shell .sg-internal-sidebar{padding:20px 16px}
html .sg-internal-shell .sg-workspace-brand{margin:0 0 18px}
html .sg-internal-shell .sg-workspace-brand .sg-brand-lockup{width:210px}
html .sg-internal-shell .sg-internal-sidebar :is(nav a,summary){min-height:38px;padding:8px 11px}
.sg-workspace-breadcrumb{display:flex;align-items:center;gap:10px;min-width:0;margin-right:auto;line-height:1.3}
.sg-workspace-breadcrumb>svg{flex:none;color:var(--sg-muted)}
.sg-workspace-breadcrumb a{color:var(--sg-link);font-size:13px;text-decoration:none;white-space:nowrap}
.sg-workspace-breadcrumb a:hover{text-decoration:underline}
.sg-workspace-breadcrumb .sg-workspace-current{font-size:16px;overflow-wrap:anywhere}
html .sg-internal-shell .sg-workspace-content .sg-page,html .sg-internal-shell.sg-demo-theme-surface .sg-page{width:100%;max-width:var(--sg-page-width);margin:0 auto;padding:var(--sg-page-top) var(--sg-page-gutter) 40px;min-width:0;color:var(--sg-ink);font-family:Arial,Helvetica,sans-serif;font-size:var(--sg-copy-size);line-height:1.55}
html .sg-internal-shell .sg-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px 24px;padding:0;margin:0 0 var(--sg-page-gap);border:0;background:transparent}
.sg-page-heading-copy{min-width:0}
html .sg-internal-shell .sg-page-header h1,html .sg-internal-shell .sg-page-title{font-size:var(--sg-title-size);line-height:1.2;font-weight:700;letter-spacing:-.5px;color:var(--sg-ink);margin:0 0 8px}
html .sg-internal-shell .sg-page-header .sg-page-eyebrow,html .sg-internal-shell .sg-page-eyebrow{font-size:10px;line-height:1.5;font-weight:600;letter-spacing:.8px;text-transform:uppercase;color:var(--sg-link);margin:0 0 8px}
html .sg-internal-shell .sg-page-header .sg-page-description,html .sg-internal-shell .sg-page-description{font-size:var(--sg-copy-size);line-height:1.55;color:var(--sg-muted);margin:0;max-width:760px}
html .sg-internal-shell .sg-page-note{font-size:12px;color:var(--sg-muted);margin:10px 0 0}
html .sg-internal-shell .sg-page-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;flex-shrink:0;padding:0;margin:0}
html .sg-internal-shell .sg-action-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 13px;border:1px solid var(--sg-line);border-radius:var(--sg-control-radius);background:var(--sg-surface);color:var(--sg-link);font:600 13px/1.4 Arial,Helvetica,sans-serif;text-decoration:none}
html .sg-internal-shell .sg-action-link:hover{background:var(--sg-soft);border-color:var(--sg-link)}
/* Reusable local navigation: horizontal on desktop; scrolls without wrapping
   or truncating labels on a small screen. Current states do not rely on color. */
html .sg-internal-shell .sg-section-nav{display:flex;align-items:stretch;gap:6px;padding:0 0 10px;margin:0 0 20px;border:0;border-bottom:1px solid var(--sg-line);border-radius:0;background:transparent;overflow-x:auto;max-width:100%;scrollbar-width:thin;flex-wrap:nowrap}
html .sg-internal-shell .sg-section-nav :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 12px;white-space:nowrap;border:1px solid transparent;border-radius:6px;font:600 13px/1.4 Arial,Helvetica,sans-serif;background:transparent;color:var(--sg-muted);text-decoration:none;flex-shrink:0}
html .sg-internal-shell .sg-section-nav :is(a,button):hover{background:var(--sg-soft);color:var(--sg-ink)}
html .sg-internal-shell .sg-section-nav :is([aria-current=page],[aria-current=true],[aria-selected=true],[aria-pressed=true]){color:var(--sg-ink);background:var(--sg-soft);border-color:var(--sg-line);box-shadow:inset 0 -3px var(--sg-accent)}
/* Catalogs use the same modest panels as the home. Their grids, covers and
   specialized information architecture remain tool-specific. */
html .sg-internal-shell :is(.juris-option,.materials-panel,.materials-card,.library-book,.info-filter-panel,.info-card){border-color:var(--sg-line);border-radius:var(--sg-panel-radius);box-shadow:none}
html .sg-internal-shell :is(.juris-option,.materials-panel,.materials-card,.info-filter-panel){padding:20px}
html .sg-internal-shell :is(.material-library,.sg-personal,.sg-law-home,.sg-law-catalog){font-family:Arial,Helvetica,sans-serif;font-size:14px;min-height:0}
html .sg-internal-shell .juris-hub{color:var(--sg-ink)}
html .sg-internal-shell .juris-hub>p{color:var(--sg-muted)}
html .sg-internal-shell .juris-options{gap:16px;margin:0 0 20px}
html .sg-internal-shell .juris-option{background:var(--sg-surface);color:var(--sg-ink);gap:12px}
html .sg-internal-shell .juris-option h2{font-size:21px;line-height:1.3}
html .sg-internal-shell .juris-option :is(p,.juris-demo){color:var(--sg-muted);font-size:13px;line-height:1.6}
html .sg-internal-shell .juris-option :is(strong,.juris-eyebrow),html .sg-internal-shell .juris-option>svg{color:var(--sg-link)!important}
html .sg-internal-shell .juris-demo{background:var(--sg-soft)}
html .sg-internal-shell .materials-breadcrumb{font-size:12px;margin:0 0 16px;color:var(--sg-muted)}
html .sg-internal-shell .materials-access{margin:0 0 16px}
html .sg-internal-shell .materials-panel{margin-bottom:20px}
html .sg-internal-shell .materials-grid{gap:16px}
html .sg-internal-shell .materials-filters{gap:14px}
html .sg-internal-shell .library-layout{max-width:var(--sg-page-width);min-height:calc(100dvh - 68px)}
html .sg-internal-shell .library-sidebar{padding:25px 14px}
html .sg-internal-shell .library-search{border-radius:var(--sg-control-radius);margin:0 0 16px!important}
html .sg-internal-shell .library-search input{min-height:44px;padding:11px 0;font-size:14px}
html .sg-internal-shell .library-book:hover{transform:none;box-shadow:none;border-color:var(--sg-link)}
html .sg-internal-shell .library-heading-actions{flex-wrap:wrap}
/* Forms: same label, control, panel and action scale; no selector reaches into
   reader documents, overlays, answer options or learning feedback. */
html .sg-internal-shell .sg-schedule{--sc-bg:var(--sg-surface);--sc-ink:var(--sg-ink);--sc-muted:var(--sg-muted);--sc-border:var(--sg-line);--sc-soft:var(--sg-soft)}
html .sg-internal-shell .sg-preferences{--pref-border:var(--sg-line);--pref-card:var(--sg-surface);--pref-muted:var(--sg-muted);color:var(--sg-ink)}
html .sg-internal-shell :is(.sg-schedule fieldset,.sg-schedule-preview,.sg-preferences section){padding:20px;border:1px solid var(--sg-line);border-radius:var(--sg-panel-radius);background:var(--sg-surface);margin:20px 0}
html .sg-internal-shell :is(.sg-schedule legend,.sg-preferences legend){font-size:14px;font-weight:700;color:var(--sg-ink)}
html .sg-internal-shell :is(.sg-schedule label,.info-field,.materials-filters label){font-size:12px;line-height:1.5;font-weight:600;color:var(--sg-muted)}
html .sg-internal-shell :is(.sg-schedule input,.sg-preferences select,.info-filter-panel input,.info-filter-panel select,.materials-filters input,.materials-filters select){min-height:44px;height:auto;padding:10px 12px;border:1px solid var(--sg-line);border-radius:var(--sg-control-radius);font:14px/1.5 Arial,Helvetica,sans-serif;color:var(--sg-ink);background:var(--sg-surface);box-shadow:none}
/* Field boundaries identify enabled textual controls on a matching surface.
   Reuse muted ink without darkening dividers or replacing feedback colors. */
html .sg-internal-shell :is(.sg-schedule,.sg-questions,.sg-support,.law-app,.sg-law-catalog,.info-filter-panel,.materials-filters) :is(input:is(:not([type]),[type=text],[type=search],[type=email],[type=url],[type=tel],[type=password],[type=number],[type=date],[type=datetime-local],[type=time],[type=month],[type=week]),textarea):not(:disabled):not([aria-invalid=true]){border-color:var(--sg-field-border)}
html .sg-internal-shell :is(.lc-search,.rx2-search):has(input:not(:disabled):not([aria-invalid=true])){border-color:var(--sg-field-border)}
html .sg-internal-shell :is(.sg-schedule button,.sg-preferences button,.sg-page-actions button){min-height:44px;border-radius:var(--sg-control-radius);padding:10px 13px;font:600 13px/1.4 Arial,Helvetica,sans-serif;border-color:var(--sg-line);color:var(--sg-ink);background:var(--sg-surface);box-shadow:none}
html .sg-internal-shell :is(.sg-schedule button.sg-schedule-primary,.sg-page-actions .personal-primary){background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-accent-text)}
html .sg-internal-shell .sg-schedule :is(button,input,a):focus-visible,html .sg-internal-shell .sg-preferences :is(button,input,select,a):focus-visible{outline:3px solid var(--sg-accent);outline-offset:3px}
html .sg-internal-shell .sg-preferences h2{font-size:21px;line-height:1.3;margin:0 0 12px}
html .sg-internal-shell .sg-preferences input[type=checkbox]{accent-color:var(--sg-link)}
/* Informativos shares the app chrome only. Approved prose, section titles,
   source links, reader font controls and the synthesis are not reformatted. */
html .sg-internal-shell .sg-informativos{--info-bg:var(--sg-bg);--info-paper:var(--sg-surface);--info-ink:var(--sg-ink);--info-muted:var(--sg-muted);--info-line:var(--sg-line);--info-soft:var(--sg-soft);--info-accent:var(--sg-link);--info-accent-soft:var(--sg-soft);--info-good:var(--sg-success);--info-good-bg:var(--sg-success-bg);--info-bad:var(--sg-danger);--info-bad-bg:var(--sg-danger-bg)}
html .sg-internal-shell .info-sample{font-size:11px;padding:0 0 12px;margin:0 0 18px;gap:10px;border-color:var(--sg-line)}
html .sg-internal-shell .info-heading-actions{max-width:none}
html .sg-internal-shell .info-button{min-height:44px;border-radius:var(--sg-control-radius);font-size:13px!important;padding:9px 13px}
html .sg-internal-shell .info-primary{background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-accent-text)!important}
html .sg-internal-shell .info-primary:hover{background:var(--sg-accent);filter:brightness(.96)}
html .sg-internal-shell .info-panel-title{font-size:13px;margin-bottom:14px}
html .sg-internal-shell .info-search input{padding-left:38px}
html .sg-internal-shell .info-search svg{top:13px}
html .sg-internal-shell .info-filter-grid{gap:14px}
html .sg-internal-shell .info-result-header{margin:20px 0 12px}
html .sg-internal-shell .info-card-meta{background:var(--sg-soft)}
html .sg-internal-shell .info-card-content>p{font-size:13px}
html .sg-internal-shell .info-card-meta small,html .sg-internal-shell .info-tags{font-size:11px}
/* Static routes already use the approved shell. Share the rhythm rather than
   adding a second layout or changing the working Início page. */
.study-app #study-content{max-width:var(--sg-page-width);padding:var(--sg-page-top) var(--sg-page-gutter) 40px}
.study-app .study-heading h1{font-size:var(--sg-title-size);line-height:1.2;margin:0 0 8px}
.study-app .study-heading{margin-bottom:var(--sg-page-gap)}
.study-app :is(.perf-toolbar,.rv-queue-heading){gap:14px}
.study-app :is(.perf-toolbar,.rv-queue-heading) label{font-size:var(--sg-label-size)}
.study-app :is(.perf-toolbar,.rv-queue-heading) select{min-height:44px;border-radius:var(--sg-control-radius);font-size:14px}
@media(max-width:1150px){html .sg-internal-shell{--sg-sidebar-width:236px}.sg-page-header .sg-page-actions{flex-shrink:1}}
@media(max-width:900px){:is(.sg-internal-shell,.study-app){--sg-page-gutter:16px;--sg-page-top:20px;--sg-title-size:25px}html .sg-internal-shell .sg-workspace-top{min-height:58px;padding:9px 16px;gap:10px}html .sg-internal-shell .sg-internal-sidebar{padding:18px 16px}html .sg-internal-shell .sg-internal-sidebar :is(nav a,summary){min-height:44px}.sg-workspace-breadcrumb{gap:6px}.sg-workspace-root-separator{display:none}.sg-workspace-breadcrumb .sg-workspace-current{font-size:14px}.sg-workspace-breadcrumb .sg-workspace-parent{font-size:12px}.sg-workspace-breadcrumb .sg-workspace-home{display:none}.sg-workspace-top .sg-shell-theme span{display:none}.sg-workspace-top .sg-shell-theme{width:40px;padding:9px}html .sg-internal-shell .sg-page-header{gap:14px;flex-wrap:wrap}html .sg-internal-shell .sg-page-actions{justify-content:flex-start;flex-shrink:1}html .sg-internal-shell .sg-page-actions:empty{display:none}html .sg-internal-shell .info-sample{flex-wrap:wrap;margin-bottom:16px}html .sg-internal-shell .library-layout{min-height:calc(100dvh - 58px)}}
@media(max-width:600px){html .sg-internal-shell .sg-page-header{display:block}html .sg-internal-shell .sg-page-actions{margin-top:14px}html .sg-internal-shell :is(.juris-option,.materials-panel,.materials-card,.info-filter-panel,.sg-schedule fieldset,.sg-schedule-preview,.sg-preferences section){padding:16px}html .sg-internal-shell .sg-page-actions>div{max-width:100%}html .sg-internal-shell .info-heading-actions{justify-content:flex-start;margin:0}html .sg-internal-shell .info-filter-grid{gap:12px}html .sg-internal-shell .info-filter-panel :is(input,select){font-size:13px;padding:10px 8px}html .sg-internal-shell .info-search input{padding-left:36px}html .sg-internal-shell .info-sample{flex-direction:column;gap:3px}html .sg-internal-shell .library-heading-actions{gap:8px}html .sg-internal-shell .library-heading-actions button{font-size:13px}.sg-workspace-breadcrumb .sg-workspace-parent{max-width:90px;overflow:hidden;text-overflow:ellipsis}.study-app :is(.perf-toolbar,.rv-queue-heading){flex-wrap:wrap}}
@media print{html .sg-internal-shell .sg-workspace-content .sg-page,html .sg-internal-shell.sg-demo-theme-surface .sg-page{max-width:none;padding:0}.sg-page-actions{display:none!important}}
/* Remaining static account panels share surfaces; chart series retain their
   correct/error meanings and are never recolored as decoration. */
.study-app .sg-performance{--perf-border:var(--study-line);--perf-muted:var(--study-muted);--paper:var(--study-surface)}
.study-app :is(.perf-section,.perf-kpi,.rv-metrics article,.rv-chart,.rv-help){border-radius:var(--sg-panel-radius);border-color:var(--study-line);background:var(--study-surface)}
.study-app .perf-section{padding:20px;margin:20px 0}
.study-app .perf-section h2{font-size:21px;line-height:1.3}
.sg-context-links{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin:-4px 0 20px;color:var(--sg-link)}
.sg-context-links a{color:var(--sg-link);text-underline-offset:3px}
html .sg-internal-shell .sg-page-actions .support-button.primary{background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-accent-text)}
html .sg-internal-shell .ed-study-heading h1{font-size:var(--sg-title-size);line-height:1.2;margin:8px 0}
html .sg-internal-shell .ed-study-heading>div>p:last-child{font-size:14px;color:var(--sg-muted);margin:8px 0 0}
html .sg-internal-shell .ed-study-heading .ed-kicker{font-size:10px;letter-spacing:.8px;color:var(--sg-link)}
@media(max-width:600px){.study-app .perf-section{padding:16px}}
/* Legal/account links sit beside StudentWorkspace in the root layout. Scope
   this bridge to student pages so the public and administration footers keep
   their own appearance. Link priority matches accessibility.css's base rule. */
body>.sg-internal-shell~.sg-access-links,body.study-app>.sg-access-links{--sg-footer-bg:#f4f7fb;--sg-footer-muted:#526784;--sg-footer-line:#d6e0ed;--sg-footer-link:#0758bc;background:var(--sg-footer-bg);color:var(--sg-footer-muted);border-color:var(--sg-footer-line)}
html[data-study-theme=dark] body>.sg-internal-shell~.sg-access-links,html[data-study-theme=dark] body.study-app>.sg-access-links{--sg-footer-bg:#0c1728;--sg-footer-muted:#b0c2da;--sg-footer-line:#3a506b;--sg-footer-link:#80bbff}
body>.sg-internal-shell~.sg-access-links a,body.study-app>.sg-access-links a{color:var(--sg-footer-link)!important}
