@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url("/static/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url("/static/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2")}
:root{--context-fasting-heat-1-ink:#2B1B00;--context-fasting-heat-2-ink:#2B1B00;--context-fasting-heat-3-ink:#2B1B00;--context-fasting-heat-4-ink:#2B1B00;--context-fasting-heat-5-ink:#2B1B00;--context-before-heat-1-ink:#111111;--context-before-heat-2-ink:#111111;--context-before-heat-3-ink:#111111;--context-before-heat-4-ink:#FFFFFF;--context-before-heat-5-ink:#FFFFFF;--context-one-hour-heat-1-ink:#111111;--context-one-hour-heat-2-ink:#111111;--context-one-hour-heat-3-ink:#111111;--context-one-hour-heat-4-ink:#111111;--context-one-hour-heat-5-ink:#111111;--context-two-hour-heat-1-ink:#111111;--context-two-hour-heat-2-ink:#111111;--context-two-hour-heat-3-ink:#111111;--context-two-hour-heat-4-ink:#111111;--context-two-hour-heat-5-ink:#000000;--context-other-heat-1-ink:#111111;--context-other-heat-2-ink:#111111;--context-other-heat-3-ink:#FFFFFF;--context-other-heat-4-ink:#FFFFFF;--context-other-heat-5-ink:#FFFFFF;--ink:#203e36;--green:#18594c;--muted:#52685f;--paper:#faf9f5;--line:#dce5df;--rose:#f4e6df;--mint:#e8f0e8;--focus:#bd6c32;--danger-ink:#842c26;--context-fasting:#FFA000;--context-fasting-soft:color-mix(in srgb,var(--context-fasting) 20%,white);--context-before:#6D3FE0;--context-before-soft:color-mix(in srgb,var(--context-before) 20%,white);--context-one-hour:#E8431F;--context-one-hour-soft:color-mix(in srgb,var(--context-one-hour) 20%,white);--context-two-hour:#00897B;--context-two-hour-soft:color-mix(in srgb,var(--context-two-hour) 20%,white);--context-other:#475569;--context-other-soft:color-mix(in srgb,var(--context-other) 20%,white);--context-fasting-ink:#2B1B00;--context-before-ink:#FFFFFF;--context-one-hour-ink:#111111;--context-two-hour-ink:#000000;--context-other-ink:#FFFFFF;--safe-bottom:env(safe-area-inset-bottom,0px);--nav-height:76px}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}a{color:var(--green);text-underline-offset:4px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,.button{min-height:48px;border:0;border-radius:14px;padding:12px 18px;background:var(--green);color:white;font-weight:650;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:disabled{opacity:.6;cursor:wait}.secondary{background:var(--mint);color:var(--green)}.danger{background:#f7e2df;color:#842c26}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px}.top{max-width:1000px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:20px 20px 12px;gap:12px}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;font-size:24px;letter-spacing:-1px;line-height:1.1}.brand b{font-weight:400}.brand small{display:block;letter-spacing:1.5px;font:9px/2 system-ui}.brand-mark{font-size:40px}.avatar{background:var(--mint);color:var(--green);width:48px;border-radius:50%;font-size:24px}main{max-width:960px;margin:auto;padding:16px 20px calc(24px + var(--nav-height) + var(--safe-bottom));min-height:65vh}h1,h2,h3,p{margin-top:0}h1{font-family:Georgia,serif;font-size:34px;line-height:1.16;font-weight:400;letter-spacing:-.6px;margin-bottom:16px}h2{font-size:22px;line-height:1.3;font-weight:600}h3{font-size:18px;line-height:1.35}small,.muted{color:var(--muted)}.eyebrow{text-transform:uppercase;font-size:11px;letter-spacing:2px;font-weight:700;color:var(--green);margin-bottom:10px}.hero{background:var(--mint);border-radius:24px;padding:26px 22px;position:relative;overflow:hidden}.hero p{max-width:460px}.hero .leaf{position:absolute;right:16px;top:6px;font:110px Georgia;color:#18594c15;pointer-events:none}.hero .button{position:relative}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:28px 0 12px}.section-head h2{margin:0}.section-head a{font-size:14px;padding:12px 0}.grid{display:grid;gap:12px}.card{padding:20px;background:#fff;border:1px solid var(--line);border-radius:20px;min-width:0}.card p:last-child{margin-bottom:0}.card-link{text-decoration:none;color:var(--ink);display:block;min-height:100px}.card-icon{font-size:26px;display:block;margin-bottom:12px;color:var(--green)}.card h3{margin-bottom:6px}.rose{background:var(--rose)}.note{font-size:14px;color:var(--muted);padding:14px 0}.pill{display:inline-block;padding:4px 10px;border-radius:20px;background:var(--mint);font-size:12px;font-weight:600}.stack>*+*{margin-top:14px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row>*{min-width:0}.grow{flex:1}.full{width:100%}label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}input,select,textarea{width:100%;min-height:48px;padding:12px;border:1px solid #9aae9f;border-radius:12px;background:#fff;color:var(--ink)}textarea{resize:vertical;min-height:90px}input[type=checkbox]{width:24px;height:24px;min-height:24px;flex-shrink:0;accent-color:var(--green)}.check{display:flex;gap:12px;align-items:center;min-height:52px;font-weight:400}.large-number{font-size:40px;font-weight:600;letter-spacing:-1px}.record{border-bottom:1px solid var(--line);padding:16px 0}.record:last-child{border:0}.record time{display:block;font-size:13px;color:var(--muted)}.record .delete{padding:10px;min-width:44px;background:transparent;color:#842c26;font-size:14px}.chart{width:100%;height:auto;display:block;max-height:240px}.chart text{fill:var(--muted);font:11px system-ui}.chart line{stroke:var(--line)}.chart-filters{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px;scrollbar-width:none}.chart-filters::-webkit-scrollbar{display:none}.chart-filter{min-height:40px;padding:8px 11px;border-radius:999px;background:var(--mint);color:var(--green);font-size:13px;white-space:nowrap}.chart-filter.is-selected{background:var(--green);color:#fff}.chart-point{cursor:pointer}.chart-point:focus-visible{outline:2px solid var(--focus);outline-offset:3px}.chart-legend{display:flex;gap:6px;flex-wrap:wrap}.summary-contexts h2{margin-bottom:10px}.summary-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0;overflow:visible}.summary-cards>div{grid-column:1/-1}.summary-context{padding:12px;border-radius:14px;background:var(--context-bg);color:var(--ink)}.summary-context>b,.summary-context>span{display:block;margin-top:6px}.summary-context>b{font-size:18px;color:var(--ink)}.summary-context>span{font-size:12px;color:var(--muted)}.heatmap-card{margin-top:18px}.heatmap{display:grid;gap:3px;font-size:11px}.heatmap-row{display:grid;grid-template-columns:38px repeat(5,minmax(0,1fr));gap:3px;min-width:0}.heatmap-row>span,.heatmap-row>time{min-width:0;min-height:36px;display:flex;align-items:center;justify-content:center;text-align:center}.heat-cell small{position:static;margin-left:3px;line-height:1}.context-chart{display:block;width:100%;height:auto;margin:0 auto}.heatmap-head{font-weight:700;color:var(--muted)}.heat-cell{border-radius:7px;background:var(--context-bg);position:relative;font-weight:700;color:var(--ink)}.heat-cell[class*="heat-level-"]{background:color-mix(in srgb,var(--context-color) var(--heat-percent),var(--context-bg))}.heat-level-1{--heat-percent:60%;color:var(--heat-1-ink)}.heat-level-2{--heat-percent:70%;color:var(--heat-2-ink)}.heat-level-3{--heat-percent:80%;color:var(--heat-3-ink)}.heat-level-4{--heat-percent:90%;color:var(--heat-4-ink)}.heat-level-5{--heat-percent:100%;color:var(--heat-5-ink)}.heat-cell small{position:absolute;right:2px;bottom:0;font-size:9px;color:var(--muted)}.article p{white-space:pre-line;overflow-wrap:anywhere}.article{max-width:680px}.back{display:inline-flex;align-items:center;min-height:44px;margin-bottom:12px}.bottom{position:fixed;bottom:0;left:0;right:0;z-index:20;display:grid;grid-template-columns:repeat(4,1fr);padding:8px max(8px,env(safe-area-inset-right)) calc(8px + var(--safe-bottom)) max(8px,env(safe-area-inset-left));background:#fff;border-top:1px solid var(--line)}.bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:52px;text-decoration:none;font-size:11px;color:var(--muted);border-radius:12px}.bottom a span{font-size:24px;line-height:1.2}.bottom a[aria-current=page]{background:var(--mint);color:var(--green);font-weight:700}footer{max-width:960px;margin:auto;padding:12px 20px calc(110px + var(--safe-bottom));font-size:12px;color:var(--muted)}#status{position:fixed;left:16px;right:16px;bottom:calc(86px + env(safe-area-inset-bottom));z-index:25;margin:0 auto;max-width:600px;background:var(--ink);color:white;border-radius:12px;padding:12px 16px;box-shadow:0 6px 30px #0002;pointer-events:none}#status:empty{display:none}.empty{padding:24px 0;color:var(--muted)}.skip{position:fixed;top:-100px;z-index:100;background:white;padding:12px}.skip:focus{top:0}.video-frame{aspect-ratio:16/9;width:100%;background:#163d34;border-radius:16px;overflow:hidden;margin:16px 0}.video-frame iframe{width:100%;height:100%;border:0}.thumb{width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--mint);border-radius:12px}.video-btn{display:block;width:100%;text-align:left;color:var(--ink);background:#fff;border:1px solid var(--line);padding:12px}.video-btn span{display:block;padding:10px 2px 0}.auth{max-width:440px;margin:auto}.error{color:#842c26;min-height:24px}.divider{border:0;border-top:1px solid var(--line);margin:24px 0}.progress{height:8px;background:var(--line);border-radius:9px;overflow:hidden;margin-top:12px}.progress span{display:block;background:var(--green);height:100%}.routine label{border-bottom:1px solid var(--line);padding:12px 0}.tabs{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}.tabs a{min-height:44px;padding:10px 14px;border-radius:20px;background:var(--mint);text-decoration:none;font-size:14px}.online{font-size:13px;color:var(--muted)}
.library-categories{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.library-category-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:76px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink);text-align:left}.library-category-card small{color:var(--muted)}.library-empty{padding:28px 20px;text-align:center}.library-empty h2{font-size:22px;margin:10px auto;max-width:520px}.admin-content-preview{white-space:pre-wrap;max-height:360px;overflow:auto;margin-top:10px}.admin-history{margin-top:10px}.library-tools{display:grid;gap:10px;margin:18px 0}.library-tools input{font-size:16px}.library-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:none}.library-chips::-webkit-scrollbar{display:none}.library-chip{flex:0 0 auto;min-height:44px;padding:9px 14px;border-radius:999px;background:var(--mint);color:var(--green);font-size:14px;white-space:nowrap}.library-chip.is-selected{background:var(--green);color:#fff}.library-notice{background:var(--mint);border-color:#cbded0;margin:14px 0}.library-notice p{margin:5px 0 0;color:var(--muted);font-size:14px}.library-results{display:grid;gap:24px}.library-feature .library-card{border:2px solid #b9d4c1}.library-card{position:relative;padding:10px;overflow:hidden}.library-card .card-link{padding:2px 2px 0}.library-cover{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:14px;background:var(--mint);margin-bottom:12px}.library-card .pill{margin-bottom:8px}.library-card h3{padding-right:42px}.library-card small{display:block;margin-top:10px}.favorite-button{position:absolute;right:10px;top:10px;width:44px;min-height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--green);font-size:26px;line-height:1}.favorite-button.is-favorite{background:var(--mint);color:var(--green)}.article-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-4px 0 16px;color:var(--muted);font-size:14px}.article-meta .favorite-button{position:static;margin-left:auto}.article-body h2{font-family:var(--font-ui);font-size:20px;margin:20px 0 8px}.article-body ul{padding-left:22px}.article-sections{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;scrollbar-width:none}.article-sections a{flex:0 0 auto;padding:8px 12px;border-radius:999px;background:var(--mint);font-size:13px;text-decoration:none}.article-section{scroll-margin-top:12px}.article-sources{margin-top:20px;font-size:14px}.video-series{margin:22px 0}.video-series-cover{position:relative}.video-series-label{position:absolute;left:10px;top:10px;padding:5px 9px;border-radius:999px;background:var(--green);color:#fff;font-size:11px;font-weight:700;letter-spacing:.05em}.video-btn{padding:10px;background:#fff;border:1px solid var(--line);border-radius:14px;text-align:left}.video-btn .thumb{margin:0}.review-pending{margin-top:14px;background:#fff6e8;border-color:#e4c58e;color:#6b4a1d}.review-pending p{margin:5px 0 0}.library-article{max-width:720px}@media(min-width:380px) and (max-width:600px){.library-results>section:not(.library-feature) .grid.two{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.library-results>section:not(.library-feature) .library-card h3{font-size:16px}.library-results>section:not(.library-feature) .library-card p{font-size:13px}.library-results>section:not(.library-feature) .library-card small{font-size:11px}}
@media(max-width:600px){.library-card{padding:10px}.library-feature .library-card{padding:10px}.library-card h3{font-size:17px}.library-article h1{font-size:30px}.article-meta .favorite-button{margin-left:auto}}@media(min-width:600px){main{padding-top:28px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{padding:38px}h1{font-size:44px}.bottom{left:50%;transform:translateX(-50%);max-width:600px;border:1px solid var(--line);border-bottom:0;border-radius:20px 20px 0 0}.top{padding:24px 20px}.hero h1{max-width:540px}}@media(max-width:340px){main,.top{padding-left:14px;padding-right:14px}h1{font-size:30px}.hero{padding:22px 18px}.button,button{padding:12px 14px}.card{padding:16px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.report-page{max-width:720px;margin:auto}.pdf-actions{display:flex;gap:10px;margin:18px 0}.pdf-actions button{flex:1}.pdf-status{min-height:24px}.report-header{border-bottom:2px solid var(--green);padding-bottom:18px;margin-bottom:18px}.report-brand{margin-bottom:18px}.report-controls fieldset{border:0;padding:0;margin:0}.report-controls legend{font-weight:700;margin-bottom:8px}.period-options{display:flex;gap:8px;flex-wrap:wrap}.period-button{background:var(--mint);color:var(--green);min-height:44px}.period-button.is-selected{background:var(--green);color:#fff}.custom-period{margin-top:12px}.report-section{margin:18px 0}.report-table-wrap{overflow-x:auto}.report-table{width:100%;border-collapse:collapse;font-size:13px}.report-table th,.report-table td{padding:10px 8px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}.report-table th{background:var(--mint);color:var(--ink)}.report-table .context-badge{white-space:nowrap}.report-footer{border-top:1px solid var(--line);margin-top:24px;padding-top:12px;font-size:12px;color:var(--muted)}.report-legend{display:flex;gap:5px;flex-wrap:wrap}.page-number{display:none}@media print{.page-number{display:inline}.page-number::after{content:'Página ' counter(page)}}@media print{ @page{size:A4 portrait;margin:14mm}html,body{background:#fff!important}.context-badge,.context-chip,.summary-context,.heat-cell,.legend-item,.context-chart,.report-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}.top,.bottom,body>footer,#status,.no-print,.pdf-actions,button,.button{display:none!important}main{max-width:none;padding:0;margin:0}.report-page{max-width:none}.report-header,.card,.summary-context,.report-table tr{break-inside:avoid;page-break-inside:avoid}.report-table thead{display:table-header-group}.report-table tfoot{display:table-footer-group}.report-table th{background:var(--mint)!important}.report-footer{position:fixed;bottom:0;left:0;right:0;background:#fff}.report-section{break-inside:avoid;page-break-inside:avoid}.report-table-section{break-before:auto}}

.glucose-summary{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:stretch;margin:18px 0}.latest{display:flex;flex-direction:column;gap:8px}.latest strong{font:400 38px/1 Georgia,serif;color:var(--green)}.latest strong small{font:16px system-ui}.context-panel{position:relative;overflow:hidden}.context-panel::before{content:"";position:absolute;inset:0 auto 0 0;width:6px;background:var(--context-color,var(--green))}.context-badge,.context-chip{display:inline-flex;align-items:center;gap:7px}.context-badge{align-self:flex-start;padding:5px 10px;border-radius:999px;background:var(--context-bg,var(--mint));color:var(--context-color,var(--green));font-weight:700;font-size:13px}.context-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.context-chip{min-height:48px;padding:8px 10px;border:2px solid transparent;border-radius:14px;background:var(--context-bg,var(--mint));color:var(--context-color,var(--green));font-weight:700;text-align:left}.context-chip.is-selected{border-color:var(--context-color,var(--green));background:var(--context-color,var(--green));color:#fff;box-shadow:inset 0 0 0 1px var(--context-color,var(--green))}.context-fasting{--heat-1-ink:var(--context-fasting-heat-1-ink);--heat-2-ink:var(--context-fasting-heat-2-ink);--heat-3-ink:var(--context-fasting-heat-3-ink);--heat-4-ink:var(--context-fasting-heat-4-ink);--heat-5-ink:var(--context-fasting-heat-5-ink);--context-ink:var(--context-fasting-ink);--context-color:var(--context-fasting);--context-bg:var(--context-fasting-soft)}.context-before{--heat-1-ink:var(--context-before-heat-1-ink);--heat-2-ink:var(--context-before-heat-2-ink);--heat-3-ink:var(--context-before-heat-3-ink);--heat-4-ink:var(--context-before-heat-4-ink);--heat-5-ink:var(--context-before-heat-5-ink);--context-ink:var(--context-before-ink);--context-color:var(--context-before);--context-bg:var(--context-before-soft)}.context-one-hour{--heat-1-ink:var(--context-one-hour-heat-1-ink);--heat-2-ink:var(--context-one-hour-heat-2-ink);--heat-3-ink:var(--context-one-hour-heat-3-ink);--heat-4-ink:var(--context-one-hour-heat-4-ink);--heat-5-ink:var(--context-one-hour-heat-5-ink);--context-ink:var(--context-one-hour-ink);--context-color:var(--context-one-hour);--context-bg:var(--context-one-hour-soft)}.context-two-hour{--heat-1-ink:var(--context-two-hour-heat-1-ink);--heat-2-ink:var(--context-two-hour-heat-2-ink);--heat-3-ink:var(--context-two-hour-heat-3-ink);--heat-4-ink:var(--context-two-hour-heat-4-ink);--heat-5-ink:var(--context-two-hour-heat-5-ink);--context-ink:var(--context-two-hour-ink);--context-color:var(--context-two-hour);--context-bg:var(--context-two-hour-soft)}.context-other{--heat-1-ink:var(--context-other-heat-1-ink);--heat-2-ink:var(--context-other-heat-2-ink);--heat-3-ink:var(--context-other-heat-3-ink);--heat-4-ink:var(--context-other-heat-4-ink);--heat-5-ink:var(--context-other-heat-5-ink);--context-ink:var(--context-other-ink);--context-color:var(--context-other);--context-bg:var(--context-other-soft)}.save-bar{position:static;margin:12px 0 0;padding:0}#record-form .record-error:empty{display:none}#record-form input,#record-form select,#record-form textarea{font-size:16px}.chart-card{margin-top:18px}.summary-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;padding:0;overflow:hidden}.summary-cards div{background:var(--mint);padding:16px;text-align:center}.context-chips+.context-help{font-size:13px;color:var(--muted)}.summary-cards b,.summary-cards span{display:block}.summary-cards b{font-size:24px;color:var(--green)}.summary-cards span{font-size:12px;color:var(--muted)}.report-intro{border-left:4px solid var(--green)}.own-video{width:100%;max-height:70vh;background:#000;border-radius:16px}@media(max-width:600px){main{padding-inline:14px;padding-bottom:calc(32px + var(--nav-height) + var(--safe-bottom))}.top{padding-inline:14px}.glucose-summary{grid-template-columns:1fr}.summary-cards div{padding:12px 6px}.summary-cards b{font-size:20px}.chart{width:100%;height:auto}.bottom{padding-bottom:var(--safe-bottom)}}@media(min-width:601px){main{padding-top:28px}}

@media print{html.renderer-print .page-number{display:none}html.renderer-print .report-footer{position:static;padding-bottom:0}html.renderer-print .report-section{break-inside:auto;page-break-inside:auto}}
@media print{html.renderer-print .summary-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}html.renderer-print .summary-context{padding:7px}html.renderer-print .summary-context b{font-size:14px}html.renderer-print .summary-context .context-badge{font-size:10px;padding:3px}html.renderer-print .summary-context span{font-size:10px}html.renderer-print h1{font-size:28px}html.renderer-print h2{font-size:18px}html.renderer-print .report-header{padding-bottom:8px;margin-bottom:10px}html.renderer-print .report-brand{margin-bottom:8px}html.renderer-print .report-section{margin:10px 0}html.renderer-print .card{padding:10px}html.renderer-print .context-chart{max-height:160px}html.renderer-print .report-table td,html.renderer-print .report-table th{padding:6px}html.renderer-print .heatmap-row>span,html.renderer-print .heatmap-row>time{min-height:24px}html.renderer-print .heatmap-card{margin-top:10px}}
@media print{.skip{display:none!important}}
@media print{html.renderer-print .report-header p{margin:5px 0}html.renderer-print .report-brand{font-size:24px;min-height:0}html.renderer-print .summary-cards>div{padding:4px;min-height:0}html.renderer-print .summary-cards>div b{font-size:18px}html.renderer-print .summary-cards>div span{font-size:11px}html.renderer-print .section-head{margin:0 0 6px}html.renderer-print .context-chart{max-height:120px}html.renderer-print .chart-card .note{font-size:10px;margin:5px 0}html.renderer-print .chart-legend .context-badge{font-size:10px}html.renderer-print .report-footer{margin-top:10px;padding-top:6px}html.renderer-print .report-footer p{margin:4px 0}html.renderer-print .report-table{font-size:11px}html.renderer-print .report-table .context-badge{font-size:10px}html.renderer-print .report-legend .context-badge{font-size:9px}}
@media print{html.renderer-print body{font-size:12px;line-height:1.35}html.renderer-print h1{font-size:24px;margin:8px 0}html.renderer-print h2{font-size:16px}html.renderer-print .summary-contexts h2{margin:6px 0}html.renderer-print .context-chart{max-height:110px}html.renderer-print .chart-card{margin-top:8px}html.renderer-print .report-footer{font-size:10px}html.renderer-print .report-header .brand small{font-size:8px}}
@media print{.pdf-status{display:none!important}html.renderer-print main{padding:0!important;min-height:0}}

html.report-only body>*:not(main){display:none!important}html.report-only main{min-height:0}html.report-only .no-print,html.report-only .pdf-actions{display:none!important}

/* Context palette lives in :root; intensity represents measurement counts. */
.context-badge,.context-chip.is-selected,.legend-item{background:var(--context-color);color:var(--context-ink)}
.context-chip{color:var(--ink)}
.summary-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow:visible}
.summary-context{border:1px solid var(--context-color);padding:0 0 14px;background:var(--context-bg);overflow:hidden}
.summary-context>.context-badge{color:var(--context-ink);display:flex;align-items:center;border-radius:0;padding:10px;font-size:13px;min-height:56px;margin:0}
.summary-context>b{font-weight:750;font-size:27px;margin:12px 10px 0;color:var(--ink)}
.summary-context>span{margin:0 10px}
.summary-context .summary-extremes{display:flex;gap:12px;padding:8px 10px 0;background:transparent;text-align:left}
.summary-extremes span{font-size:12px;color:var(--muted)}
.summary-extremes strong{display:block;font-size:22px;color:var(--ink)}
.heat-cell{background:#EEF1F4;color:#626D78;font-weight:750}
.heat-cell[class*="heat-level-"]{background:color-mix(in srgb,var(--context-color) var(--heat-percent),white)}
.heat-level-1{--heat-percent:60%;color:var(--heat-1-ink)}.heat-level-2{--heat-percent:70%;color:var(--heat-2-ink)}.heat-level-3{--heat-percent:80%;color:var(--heat-3-ink)}.heat-level-4{--heat-percent:90%;color:var(--heat-4-ink)}.heat-level-5{--heat-percent:100%;color:var(--heat-5-ink)}

.heat-cell small{color:inherit}
.context-chart{width:100%;max-height:none}
.context-chart text{font-size:13px}
.legend-item{display:inline-flex;align-items:center;gap:5px;border-radius:12px;padding-right:7px;font-size:12px}
.legend-item .context-badge{font-size:12px}
@media print{html.renderer-print .context-chart{max-height:none;width:100%}html.renderer-print .summary-context{padding:0 0 7px}html.renderer-print .summary-context>.context-badge{font-size:10px;padding:6px;min-height:38px}html.renderer-print .summary-context>b{font-size:20px;margin:6px 6px 0}html.renderer-print .summary-context .summary-extremes{gap:8px;padding:4px 6px 0}html.renderer-print .summary-extremes strong{font-size:17px}}

.summary-context>.context-badge span{color:inherit}

.context-badge,.summary-context>.context-badge{font-weight:750}
.context-chip,.chart-filter{border:1.5px solid var(--context-color,var(--green));background:#fff;color:var(--ink)}
.context-chip.is-selected,.chart-filter.is-selected{background:var(--context-color,var(--green));color:var(--context-ink,#fff)}
@media print{.chart-filter,.context-chip{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Compact report: screen controls remain separate from the printed document. */
:root{--context-one-hour-ink:#fff;--context-two-hour-ink:#fff}
[hidden]{display:none!important}
.context-short{display:none}
.report-brand{display:none}
.report-meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:11px}
.period-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(110px,1.6fr);gap:0;border-radius:10px;overflow:hidden}
.period-button{height:40px;min-height:40px;border-radius:0;padding:6px;font-size:13px;white-space:nowrap;border-right:1px solid var(--line)}
.custom-period{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.summary-contexts h2 small{font:400 12px system-ui;margin-left:6px}
.summary-missing{font-size:12px;color:var(--muted);margin:6px 0 0}
.summary-context>.context-badge{height:28px;min-height:28px;padding:3px 8px;font-size:12px}
.summary-context{padding:0 0 6px}
.summary-context>b{font-size:23px;margin:3px 8px 0;line-height:1.2}
.summary-context>b small{font-size:11px}
.summary-average{font-size:10px!important;line-height:1.1}
.summary-context .summary-extremes{padding:3px 8px 0;gap:0}
.summary-extremes strong{display:inline;font-size:12px}
.chart-toolbar{display:flex;align-items:center;gap:8px;overflow-x:auto}
.chart-filters{flex-shrink:0;padding:0;gap:3px}
.chart-filter{min-height:30px;padding:4px 6px;font-size:11px}
.chart-legend{flex-wrap:nowrap;flex-shrink:0;gap:4px}
.chart-legend .legend-item{white-space:nowrap;padding:0;font-size:10px}
.chart-legend .context-badge{font-size:10px;padding:3px 5px}
.heatmap{max-height:280px;overflow-y:auto}
.heatmap-head{position:sticky;top:0;background:white;z-index:1}
.heatmap-row>span,.heatmap-row>time{min-height:32px;height:32px}
.heatmap-head>span{gap:3px}
.heat-cell[class*="heat-level-"]{opacity:1}
.report-table td{height:40px;padding:5px 4px;vertical-align:middle}
.report-table .context-badge{padding:3px 5px;font-size:11px;gap:3px}
.report-page{padding-bottom:72px}
.report-page .pdf-actions{position:fixed;bottom:calc(var(--nav-height) + var(--safe-bottom));left:50%;transform:translateX(-50%);width:min(720px,100%);margin:0;padding:8px 12px;background:var(--paper);border-top:1px solid var(--line);z-index:19}
.alert-summary{font-size:13px;margin-bottom:6px}
.alert-panel summary{cursor:pointer;color:var(--green);font-size:13px;font-weight:650}
@media(max-width:480px){
 .card{padding:12px}.section-head{margin:12px 0 8px;gap:6px}h2{font-size:18px;margin-bottom:8px}
 .report-header{padding-bottom:8px;margin-bottom:12px}.report-header h1{font-size:26px;margin-bottom:8px}.report-header .eyebrow{margin-bottom:4px}
 .report-meta{margin:0;font-size:10px;gap:2px 6px}.report-meta b{font-weight:600}
 .report-section{margin:12px 0}.report-controls legend{font-size:13px;margin-bottom:6px}
 .summary-context{padding:0 0 6px;max-height:96px}.summary-cards{gap:8px}
 .summary-context .context-full,.report-table .context-full,.chart-legend .context-full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .summary-context .context-short,.report-table .context-short,.chart-legend .context-short{display:inline}
 .context-chart{height:160px;max-height:160px}.chart-card{margin-top:0}.chart-card .section-head{margin-top:0;flex-wrap:wrap}
 .chart-card .pill{font-size:10px;padding:2px 5px}.chart-card .note{font-size:11px;padding:0;margin:5px 0 0}
 .heatmap-card{margin-top:12px}.heatmap-card .section-head{margin-top:0}.heatmap-card .pill{font-size:10px;padding:2px 5px}
 .report-table{font-size:13px}.report-table th{padding:5px 4px;font-size:11px}.report-table td:first-child{font-size:11px;white-space:nowrap}
 .report-footer{margin-top:12px;padding-top:8px;font-size:11px}.report-footer p{margin-bottom:6px}.report-legend .context-badge{font-size:10px;padding:3px 5px}
 .report-page .pdf-status:empty{display:none}.report-page .pdf-actions button{min-height:40px;padding:8px}
}
@media print{
 @page{size:A4 portrait;margin:10mm 12mm 16mm}
 .report-brand{display:flex!important}.report-page{padding-bottom:0}.report-controls,.pdf-actions,.pdf-status{display:none!important}
 .report-meta{font-size:10px}.report-header,html.renderer-print .report-header{margin-bottom:6px;padding-bottom:6px}
 .report-section,html.renderer-print .report-section{margin:6px 0}.card,html.renderer-print .card{padding:7px}
 .summary-cards,html.renderer-print .summary-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
 .summary-context,html.renderer-print .summary-context{padding:0 0 4px}
 .summary-context>.context-badge,html.renderer-print .summary-context>.context-badge{min-height:24px;height:24px;padding:3px;font-size:9px}
 .summary-context>b,html.renderer-print .summary-context>b{font-size:17px;margin:3px 5px 0}
 .summary-context .summary-extremes,html.renderer-print .summary-context .summary-extremes{padding:2px 5px 0}
 .summary-extremes strong,html.renderer-print .summary-extremes strong{display:inline;font-size:10px}
 .context-chart,html.renderer-print .context-chart{height:110px;max-height:110px;width:100%}
 .chart-toolbar{overflow:visible}.chart-filters{display:none}.chart-legend{flex-wrap:wrap}.chart-card .note{font-size:10px;margin:3px 0;padding:0}
 .heatmap{max-height:none;overflow:visible}.heatmap-head{position:static}.heatmap-card{margin-top:6px}
 .heatmap-row>span,.heatmap-row>time{height:24px;min-height:24px}
 .report-table td,.report-table th,html.renderer-print .report-table td,html.renderer-print .report-table th{height:auto;padding:4px;font-size:10px}
 .report-footer,html.renderer-print .report-footer{font-size:9px;margin-top:6px;padding-top:5px}
 .report-legend .context-badge{font-size:9px;padding:2px 4px}
 .alert-panel details>*{display:block}.alert-panel details summary{display:none}
}
.chart-select{display:none}
@media(max-width:480px){
 .chart-select{display:block;width:82px;flex:0 0 82px;min-height:30px;height:30px;font-size:11px;padding:3px;border-radius:8px}
 .chart-filters{display:none}.chart-legend .legend-count{display:none}
 .report-meta>span:first-child>b{display:none}
}
.context-badge .context-short{display:none}
@media(max-width:480px){
 .summary-context .context-badge .context-short,.report-table .context-badge .context-short,.chart-legend .context-badge .context-short{display:inline}
 .stack>*+*{margin-top:12px}
}

/* Glucose diary: compact header and actions in document flow. */
@media screen{
 body.glucose-view .top{max-width:760px;padding-top:12px;padding-bottom:8px}
 body.glucose-view .top .brand{max-height:32px;font-size:20px}
 body.glucose-view .top .brand-mark{font-size:29px;line-height:1}
 body.glucose-view .top .brand img{max-height:32px;width:auto}
 body.glucose-view .top .brand small{font-size:7px;line-height:1.2}
 main[data-page="glicemia"],main[data-page="relatorio"]{max-width:760px;padding-top:8px;padding-bottom:calc(88px + env(safe-area-inset-bottom));--diary-gap:12px}
 main[data-page="glicemia"]>.eyebrow{font-size:11px;margin-bottom:4px}
 main[data-page="glicemia"]>h1{font-size:26px;line-height:1.15;margin-bottom:6px}
 main[data-page="glicemia"]>.muted{font-size:14px;color:var(--muted);margin-bottom:12px}
 main[data-page="glicemia"] .glucose-summary{display:block;margin:0 0 var(--diary-gap)}
 main[data-page="glicemia"] .latest{gap:4px;padding:12px 16px}
 .latest-label{font-size:11px;line-height:1.2;letter-spacing:1px}
 .latest-reading{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
 .latest-reading strong{font-size:30px;white-space:nowrap}
 .latest-reading strong small{font-size:13px}
 .latest-reading>.context-badge{align-self:center;font-size:12px;padding:3px 8px}
 .latest-reading>span:last-child{font-size:12px;color:var(--muted)}
 main[data-page="glicemia"]>#record-form{margin-bottom:var(--diary-gap)}
 main[data-page="glicemia"]>.section-head{margin:var(--diary-gap) 0}
 main[data-page="glicemia"]>.card,main[data-page="glicemia"]>.summary-contexts{margin-top:0;margin-bottom:var(--diary-gap)}
 main[data-page="glicemia"] .chart-card .section-head,main[data-page="glicemia"] .heatmap-card .section-head{margin-top:0}
 main[data-page="glicemia"] .heatmap-head{position:static}
 .context-chart{height:160px;max-height:160px;max-width:286.32px;margin-inline:auto}
 .context-chart text{font-size:14.25px}
 @media(min-width:601px){
  main[data-page="glicemia"]{--diary-gap:16px}
  main[data-page="glicemia"]>h1{font-size:32px}
  .context-chart{height:220px;max-height:220px;max-width:393.69px}
  .context-chart text{font-size:11px}
 }
}

/* Accessible typography shared by the diary and the printed report. */
:root{--font-ui:"Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--nav-height:84px}
body{font-family:var(--font-ui);line-height:1.45}
body *{font-family:inherit}
h1{font-family:var(--font-ui);font-weight:700}
main[data-page="glicemia"]>h1{font-family:Georgia,serif;font-weight:400}
button,.button,.chart-filter,.period-button,.context-chip,.chart-select{font-size:15px;min-height:44px;line-height:1.45}
.chart-select{height:auto;width:auto;flex-basis:auto}
label,.note,.section-head a,.record .delete,.alert-summary,.alert-panel summary,.report-controls legend,main[data-page="glicemia"]>.muted,.report-table,.report-table th,.report-table td,.report-table td:first-child{font-size:14px;line-height:1.45}
small,.brand small,body.glucose-view .top .brand small,.eyebrow,main[data-page="glicemia"]>.eyebrow,.pill,.record time,.bottom a,footer,.report-footer,.report-meta,.summary-contexts h2 small,.summary-missing,.summary-context>span,.summary-context>b small,.summary-average,.summary-extremes span,.summary-extremes strong,.chart-legend .legend-item,.chart-legend .context-badge,.legend-item,.legend-item .context-badge,.report-legend .context-badge,.report-table .context-badge,.chart-card .note,.chart-card .pill,.heatmap-card .pill,.latest-label,.latest-reading>span:last-child,.context-chips+.context-help{font-size:12.5px!important;line-height:1.45}
.brand small,body.glucose-view .top .brand small{letter-spacing:.5px}
body.glucose-view .top .brand{max-height:none}
.context-badge,.latest-reading>.context-badge,.summary-context>.context-badge{font-size:14px;line-height:1.45;height:auto;min-height:0}
.summary-context{max-height:none}
.summary-context>b,.summary-cards b{font-size:24px;line-height:1.45}
.latest strong,.latest-reading strong{font-family:var(--font-ui);font-size:36px;font-weight:700;line-height:1.45;letter-spacing:normal}
.latest strong small{font-family:var(--font-ui);font-size:14px}
.latest strong,.large-number,.summary-context b,.summary-extremes strong,.heat-cell,.record b,.report-table td:nth-child(4){font-weight:700;font-variant-numeric:tabular-nums}
.heatmap{font-size:12.5px}
.heatmap-row{grid-template-columns:40px repeat(5,minmax(0,1fr))}
.heatmap-row>span,.heatmap-row>time{height:auto;min-height:44px}
.heat-cell{font-size:14px}
.heat-cell:has(small){padding-top:12px}
.heat-cell small{position:absolute;top:2px;right:2px;bottom:auto;margin:0;padding:0 3px;border-radius:4px;background:#fff;color:var(--ink);font-size:12.5px!important;line-height:1.2}
.chart-toolbar{flex-wrap:wrap;overflow:visible}
.chart-legend{flex-wrap:wrap;flex-shrink:1}
.context-chart{height:auto;max-height:none;max-width:340px;width:100%}
.chart text,.context-chart text{font-family:var(--font-ui);font-size:12.5px;font-variant-numeric:tabular-nums}
.bottom{width:min(560px,100%);left:50%;right:auto;transform:translateX(-50%);min-height:calc(var(--nav-height) + var(--safe-bottom));padding:8px 8px calc(8px + var(--safe-bottom))}
main,main[data-page="glicemia"],main[data-page="relatorio"]{padding-bottom:calc(24px + var(--nav-height) + var(--safe-bottom))}
body>footer{padding-bottom:calc(24px + var(--nav-height) + var(--safe-bottom))}
@media(min-width:601px){
 label,.note,.section-head a,.record .delete,.alert-summary,.alert-panel summary,.report-controls legend,main[data-page="glicemia"]>.muted,.report-table,.report-table th,.report-table td,.report-table td:first-child,.context-badge{font-size:15px}
 .latest strong,.latest-reading strong{font-size:40px}
 .chart text,.context-chart text{font-size:13px}
}
@media print{
 html.renderer-print body{font-size:14px;line-height:1.45}
 html.renderer-print .summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.renderer-print .summary-context{max-height:none}
 html.renderer-print .summary-context>b{font-size:24px;line-height:1.45}
 html.renderer-print .summary-context>.context-badge{font-size:14px;height:auto;min-height:28px}
 html.renderer-print .summary-extremes strong{font-size:14px}
 html.renderer-print .report-table th,html.renderer-print .report-table td{font-size:14px}
 html.renderer-print .context-chart{height:auto;max-height:none;max-width:340px}
 html.renderer-print .heatmap-row>span,html.renderer-print .heatmap-row>time{height:auto;min-height:40px}
 html.renderer-print main{padding:0!important}
}
@media screen and (max-width:600px){.context-chart text{font-size:14.25px}}

/* Administrative list: exactly two layout groups, information and actions. */
.admin-toolbar{display:grid;gap:14px;margin:18px 0}.admin-toolbar-head,.admin-pagination{display:flex;align-items:center;gap:10px}.admin-toolbar-head{justify-content:space-between}.admin-toolbar-head h2{margin:2px 0 0}.admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.admin-stat{padding:9px 11px;border:1px solid #cbd8d0;border-radius:12px;background:#fff}.admin-stat b,.admin-stat span{display:block}.admin-stat b{font-size:21px;color:var(--green)}.admin-stat span{font-size:12px;color:#405b51}.admin-filters{display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(130px,1fr));gap:8px}.admin-toolbar-actions{display:flex;align-items:center;gap:8px}.admin-toolbar-actions button{width:auto;white-space:nowrap}.admin-filters label{font-size:13px;color:var(--muted)}.admin-filters input,.admin-filters select{margin-top:4px}.admin-editor{margin:16px 0}.admin-list{overflow:visible}.admin-row{display:flex;align-items:center;width:100%;min-width:0;gap:14px;padding:7px 0;border-bottom:1px solid #cbd8d0}.admin-row-main{display:flex;align-items:center;min-width:0;flex:1 1 auto;gap:12px}.admin-row h3{display:block;overflow:hidden;min-width:0;flex:1 1 auto;margin:0;font-size:15px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.admin-row-meta{display:flex;align-items:center;flex:0 0 auto;min-width:0;gap:5px;color:var(--muted);font-size:12px;line-height:1.2;white-space:nowrap}.admin-row-meta .pill{padding:3px 8px;font-size:11px;background:#d9e9df;color:#154d40}.admin-status-draft{background:#f1dfb5!important;color:#61491b!important}.admin-status-published{background:#c7e5d2!important;color:#14533f!important}.admin-editorial-inline{color:#52685f;font-size:11px}.admin-actions{display:flex;align-items:center;flex:0 0 auto;gap:6px;white-space:nowrap}.admin-icon-button{display:inline-flex;align-items:center;justify-content:center;width:40px!important;min-width:40px!important;max-width:40px;height:40px;min-height:40px!important;flex:0 0 40px!important;padding:0!important;border:1px solid #a9c9b5;border-radius:9px;background:#d9e9df;color:#154d40;line-height:1}.admin-icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.admin-icon-button:hover{background:#b5d2c0}.admin-icon-button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.admin-actions-menu{position:relative;display:block;flex:0 0 40px;width:40px;height:40px}.admin-actions-menu>summary{list-style:none}.admin-actions-menu>summary::-webkit-details-marker{display:none}.admin-action-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:3;display:grid;gap:4px;min-width:170px;padding:6px;background:#fff;border:1px solid #9fbaaa;border-radius:10px;box-shadow:0 8px 20px #203e3622}.admin-action-menu button{width:100%;min-height:36px;padding:7px 9px;text-align:left;background:transparent;color:var(--ink);font-size:13px}.admin-history-slot{flex-basis:100%}.admin-pagination{justify-content:center;margin:18px 0}.admin-pagination span{font-size:13px}.admin-preview-banner{margin-bottom:16px;padding:12px 14px;border:1px solid #d8b35c;border-radius:12px;background:#fff6dc;color:#6b4a1d;font-weight:700;font-size:13px;letter-spacing:.04em}.admin-preview .library-cover{margin-bottom:16px}.admin-toolbar-head>button{background:#18594c}
@media(max-width:600px){.admin-stats{grid-template-columns:repeat(2,1fr)}.admin-filters{grid-template-columns:1fr 1fr}.admin-filters label:first-child{grid-column:1/-1}.admin-row{align-items:flex-start;gap:8px;padding:8px 0}.admin-row-main{display:block;min-width:0}.admin-row h3{display:-webkit-box;font-size:14px;line-height:1.18;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical}.admin-row-meta{gap:4px;margin-top:4px;font-size:11px;white-space:normal}.admin-row-meta .pill{padding:2px 6px;font-size:10px}.admin-editorial-inline{font-size:10px}.admin-actions{gap:4px}.admin-icon-button{width:40px!important;min-width:40px!important;max-width:40px;height:40px}.admin-action-menu{right:0}.admin-editor{padding:14px}}
/* Master admin tabs */
.admin-tabs{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px;margin:12px 0 18px;border-bottom:1px solid var(--line);scrollbar-width:none}.admin-tabs::-webkit-scrollbar{display:none}.admin-tab{flex:0 0 auto;min-height:42px;padding:9px 14px;border:1px solid #b5cec0;border-radius:12px;background:#e4f0e8;color:#18594c;font-size:14px;white-space:nowrap}.admin-tab.is-active{background:#18594c;color:#fff;border-color:#18594c}.admin-settings{max-width:680px}.recipe-fields{display:grid;gap:14px}.video-series{margin:22px 0}.video-series-cover{position:relative}.video-series-label{position:absolute;left:10px;top:10px;padding:5px 9px;border-radius:999px;background:var(--green);color:#fff;font-size:11px;font-weight:700;letter-spacing:.05em}
@media(min-width:601px){.recipe-fields{grid-template-columns:1fr 1fr}.recipe-fields label:nth-child(2),.recipe-fields label:nth-child(5),.recipe-fields label:nth-child(6),.recipe-fields label:nth-child(7){grid-column:1/-1}}
/* Compact content editor */
.admin-editor[hidden]{display:none}.admin-editor{position:fixed;z-index:30;inset:5vh 50% auto;transform:translateX(-50%);width:min(620px,calc(100vw - 32px));max-height:90vh;overflow:auto;margin:0;padding:20px;box-shadow:0 18px 60px #173c2d33}.admin-editor::before{content:'';position:fixed;z-index:-1;inset:-100vh;width:100vw;background:#173c2d66}.admin-editor .section-head{position:sticky;top:-20px;padding:4px 0 12px;background:#fff;z-index:1}.admin-editor textarea{min-height:76px}.admin-editor .advanced-fields{display:grid;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f7faf7}.admin-editor .advanced-fields[hidden]{display:none}.admin-link-preview{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;color:var(--muted);font-size:13px}.admin-youtube-preview{width:128px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:var(--mint)}.video-btn{display:flex;flex-direction:column;gap:8px;padding:0;border:0;background:transparent;color:var(--ink);text-align:left}.video-btn .thumb{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;background:var(--mint)}.video-series-cover .thumb{width:100%;max-height:280px;object-fit:cover;aspect-ratio:16/9;border-radius:14px}.video-series{margin:18px 0}.video-series .empty{margin:4px 0;padding:10px 12px;font-size:14px}.video-series:has(.empty) .video-series-cover{display:none}
@media(max-width:600px){.admin-editor{inset:0;transform:none;width:100%;max-height:100dvh;border-radius:0;padding:16px;padding-bottom:92px}.admin-editor::before{display:none}.admin-editor .section-head{top:-16px}.admin-editor>button[type=submit]{position:fixed;z-index:2;right:16px;bottom:16px;left:16px}.admin-youtube-preview{width:112px}}
/* MVP admin: hide technical metadata from the primary workflow. */
.admin-row-meta span:nth-child(n+3),.admin-editor .advanced-fields[hidden]{display:none}
@media(max-width:600px){.admin-toolbar-actions{align-items:stretch;flex-direction:column}.admin-toolbar-actions button{width:auto}.admin-filters{grid-template-columns:1fr}.admin-filters label:first-child{grid-column:auto}}
.admin-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.admin-form-actions button{width:auto}.admin-publish-button{background:#26745d}
@media(max-width:600px){.admin-form-actions{position:sticky;bottom:-16px;margin:8px -16px -16px;padding:12px 16px;background:#fff;border-top:1px solid var(--line);z-index:2}.admin-form-actions button{flex:1}}
/* Client video learning view */
.video-playlist-layout{display:grid;grid-template-columns:minmax(0,7fr) minmax(280px,3fr);gap:18px;align-items:start;margin-top:18px}.video-main-column,.video-player-shell{min-width:0}.video-player-shell{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 8px 24px #173c2d0d}.video-player-placeholder,.video-player-shell iframe,.video-player-shell video{display:block;width:100%;aspect-ratio:16/9;border:0}.video-player-placeholder{position:relative;background:var(--mint)}.video-player-placeholder>img{width:100%;height:100%;object-fit:cover}.video-play{position:absolute;top:50%;left:50%;width:64px!important;min-height:64px!important;padding:0!important;transform:translate(-50%,-50%);border-radius:50%;background:var(--green);color:#fff;font-size:24px;box-shadow:0 4px 16px #173c2d44}.video-selected-info{padding:16px 18px}.video-selected-info h2{margin:2px 0 4px}.video-selected-info p{margin:0;color:var(--muted);white-space:pre-wrap}.video-playlist-card{padding:14px;max-height:calc(56.25vw - 20px);overflow:hidden}.video-playlist-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 2px 12px;border-bottom:1px solid var(--line)}.video-playlist-heading h2{margin:0;font-size:20px}.video-playlist-items{display:grid;gap:6px;max-height:calc(56.25vw - 100px);overflow-y:auto;padding-top:8px}.playlist-item{display:grid;grid-template-columns:96px minmax(0,1fr);gap:9px;width:100%;padding:7px;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--ink);text-align:left}.playlist-item:hover,.playlist-item:focus-visible{background:var(--mint)}.playlist-item.is-selected{border-color:#9fc6af;background:var(--mint)}.playlist-item img{width:96px;height:54px;object-fit:cover;border-radius:7px;background:var(--mint)}.playlist-item-copy{display:grid;align-content:center;min-width:0;gap:2px}.playlist-item-copy b{overflow:hidden;font-size:13px;line-height:1.25;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.playlist-item-copy small{overflow:hidden;color:var(--muted);font-size:11px;line-height:1.2;white-space:nowrap;text-overflow:ellipsis}.video-empty{padding:24px;text-align:center}.video-empty p{margin-bottom:0;color:var(--muted)}
@media(max-width:800px){.video-playlist-layout{display:block}.video-playlist-card{max-height:none;margin-top:14px}.video-playlist-items{max-height:none;overflow:visible}.playlist-item{grid-template-columns:112px minmax(0,1fr);min-height:72px;padding:8px}.playlist-item img{width:112px;height:63px}.video-selected-info{padding:14px 15px}.video-selected-info h2{font-size:20px}}
@media(max-width:600px){main[data-page="videos"]{padding-bottom:calc(30px + var(--nav-height) + var(--safe-bottom));}.video-playlist-layout{margin-top:12px}.video-player-shell{border-radius:13px}.video-playlist-card{padding:10px;border-radius:14px}.video-playlist-heading{padding-bottom:9px}.video-playlist-heading h2{font-size:18px}.playlist-item-copy b{font-size:14px}.video-empty{padding:20px 14px}}
/* Compact health dashboard and reading dialogs. */
.header-user{margin-left:auto;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.top{padding-top:16px;padding-bottom:8px}.brand-mark{font:700 21px/1 system-ui;background:var(--green);color:#fff;border-radius:12px;padding:12px 8px;letter-spacing:-1px}.brand{font-size:21px;letter-spacing:-.5px}.dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.dashboard-heading h1{font:700 24px/1.2 "Atkinson Hyperlegible",sans-serif;margin:0}.dashboard-heading .eyebrow{margin-bottom:4px}.dashboard-heading a{font-size:14px;white-space:nowrap}.health-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.health-card{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;gap:8px;padding:16px 14px;border-radius:16px;color:var(--ink);text-align:left;min-width:0;background:#fff;font-weight:400}.health-card>span{font-size:13px;color:var(--muted)}.health-card strong{display:block;font-size:21px;line-height:1.25;overflow-wrap:anywhere}.health-card strong small{font-size:12px;font-weight:400}.health-card>small{font-size:11px;margin-top:auto}.weight-card:hover{border-color:var(--green);background:var(--mint)}.week-summary,.dashboard-chart{margin-top:14px;padding:18px}.week-summary .section-head{margin:0 0 14px}.week-summary h2,.dashboard-chart h2,.history-heading h2{font-size:18px}.week-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}.week-stats>div{display:flex;flex-direction:column;gap:2px;border-left:2px solid var(--line);padding-left:10px}.week-stats span,.week-stats small{font-size:12px;color:var(--muted)}.week-stats strong{font-size:20px;line-height:1.4;overflow-wrap:anywhere}.week-summary>small{font-size:12px}.history-heading{margin:20px 0 12px;flex-wrap:wrap}.history-heading button{min-height:44px;font-size:14px}.record-vitals{font-size:13px;color:var(--muted);margin:8px 0}.glucose-view .chart-filters{flex-wrap:wrap;overflow:visible}.glucose-view #history{padding:6px 16px}.glucose-view main{padding-top:12px}.modal-open{overflow:hidden}.health-modal{padding:0;border:1px solid var(--line);border-radius:22px;background:var(--paper);color:var(--ink);width:calc(100% - 24px);max-width:560px;max-height:calc(100dvh - 24px);overflow:hidden;box-shadow:0 20px 80px #102d3840}.health-modal::backdrop{background:#183c345c;backdrop-filter:blur(3px)}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}.modal-heading h2{margin:0;font-size:21px}.modal-heading button{min-height:40px;padding:5px 13px;font-size:24px}.health-modal form{display:flex;flex-direction:column;max-height:calc(100dvh - 103px);overflow:hidden}.modal-fields{padding:16px 18px;overflow-y:auto;overscroll-behavior:contain;min-height:0}.modal-fields.stack>*+*{margin-top:12px}.modal-fields input{min-width:0;max-width:100%;padding:9px 10px;min-height:44px}.modal-fields textarea{min-height:70px}.modal-actions{flex-shrink:0;display:flex;justify-content:flex-end;gap:10px;padding:12px 18px;border-top:1px solid var(--line);background:#fff}.modal-actions button{min-height:44px}.pressure-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}.optional-vitals{min-width:0;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px}.optional-vitals legend{font-size:13px;color:var(--muted);padding:0 5px}.health-modal .context-chips{display:flex;flex-wrap:wrap;gap:6px}.health-modal .context-chip{min-height:38px;padding:7px 10px;font-size:12px;border:1px solid var(--line);background:white;color:var(--green);border-radius:10px}.health-modal .context-chip.is-selected{background:var(--green);color:white;border-color:var(--green);box-shadow:inset 0 0 0 1px white}.health-modal .context-chip span{white-space:normal}.health-modal label{font-size:13px}.report-table td{overflow-wrap:anywhere}.report-table{table-layout:fixed;width:100%}.report-table-wrap{overflow:visible}.weight-report{margin-top:18px}.weight-report p{border-bottom:1px solid var(--line);padding:8px 0}
@media(min-width:760px){.health-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.health-card{padding:18px 16px}.health-card strong{font-size:24px}.dashboard-heading h1{font-size:26px}}
@media(max-width:420px){.top{padding-left:16px;padding-right:16px;gap:8px}.brand{font-size:17px}.brand-mark{font-size:18px;padding:10px 7px}.header-user{max-width:28%;font-size:12px}.avatar{width:40px;min-height:40px;padding:6px}.health-card strong{font-size:19px}.report-table th,.report-table td{font-size:10px;padding:5px 3px}.history-heading button{width:100%}}
body.glucose-view .top .brand-mark{font-size:21px;line-height:1}
@media(max-width:420px){body.glucose-view .top .brand{font-size:17px}body.glucose-view .top .brand-mark{font-size:18px}}
/* Three public indicators: fixed mobile tabs and compact desktop navigation. */
@media screen{
 .bottom{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:none;left:0;right:0;transform:none;border-radius:0;gap:4px}
 .bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:4px;text-align:center;min-height:56px}
 .bottom a>span{font-size:13px;line-height:1.2;letter-spacing:0}
 .bottom svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
 .bottom .nav-full{display:none}
 .health-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 main[data-page="pressao"],main[data-page="frequencia"]{max-width:760px;padding-top:12px}
 .vital-latest{display:flex;flex-direction:column;gap:6px}
 .vital-latest strong{font-size:28px;line-height:1.3}
 .vital-latest time,.vital-latest>span{font-size:13px;color:var(--muted)}
 .vital-latest strong small{font-size:14px}
 .vital-stat h3{font-size:15px;margin:10px 0 6px}
 .vital-stat p{font-size:14px;overflow-wrap:anywhere}
}
.vital-chart{width:100%;max-height:240px}.vital-series-0{stroke:var(--green);fill:var(--green)}.vital-series-1{stroke:var(--focus);fill:var(--focus)}.vital-series-1 polyline{stroke-dasharray:6 4}.vital-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12px;color:var(--muted)}.vital-key::before{content:"";display:inline-block;width:15px;border-top:3px solid var(--green);margin-right:6px;vertical-align:middle}.vital-key-1::before{border-top-color:var(--focus);border-top-style:dashed}
@media screen and (min-width:760px){
 :root{--nav-height:0px}
 .bottom{position:static;grid-template-columns:repeat(3,minmax(0,1fr));width:calc(100% - 40px);max-width:720px;min-height:0;margin:6px auto 12px;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--mint)}
 .bottom a{flex-direction:row;gap:8px;padding:10px;min-height:44px;font-size:14px}
 .bottom a>span{font-size:14px}
 .bottom .nav-short{display:none}
 .bottom .nav-full{display:inline}
 .bottom svg{width:20px;height:20px}
 .health-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
 main[data-page="glicemia"],main[data-page="pressao"],main[data-page="frequencia"]{padding-bottom:28px}
}
/* Saúde em Dia: shared identity for screens, dialogs and reports. */
:root{--ink:#1d304c;--green:#2563eb;--muted:#596b83;--paper:#f7faff;--line:#e1eaf5;--mint:#edf4ff;--rose:#f0f5ff;--focus:#1550be;--context-fasting:#3169c6;--context-before:#795ac3;--context-one-hour:#ae6631;--context-two-hour:#167c85;--context-before-sleep:#5966a9;--context-overnight:#64748b}
body{background:linear-gradient(180deg,#fff 0,#f4f8ff 480px,#f9fbff 100%);font-family:"Atkinson Hyperlegible",system-ui,sans-serif}
h1,h2,h3,main[data-page="glicemia"]>h1{font-family:"Atkinson Hyperlegible",system-ui,sans-serif;font-weight:700;letter-spacing:-.4px}
.top{max-width:1080px;padding:22px 24px 18px;gap:12px}.brand,.glucose-view .top .brand{font-family:inherit;font-size:22px;color:var(--ink);letter-spacing:-.6px;white-space:nowrap}.brand b{font-weight:700;color:var(--green)}.brand-mark,.glucose-view .top .brand-mark{display:grid;place-items:center;width:42px;height:42px;padding:9px;flex-shrink:0;border-radius:13px;background:var(--green);box-shadow:0 4px 12px #2563eb1c}.brand-mark svg{width:100%;height:100%;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.avatar{border:1px solid var(--line);background:#fff;color:var(--green);width:42px;min-height:42px;font-size:22px}.header-user{color:var(--muted)}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 4px 20px #244c8210}.dashboard-heading h1{font-size:28px;letter-spacing:-.7px}.dashboard-heading{margin:6px 0 20px}.dashboard-heading a{font-size:13px;text-decoration:none;font-weight:700}.dashboard-heading .eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--muted)}
.health-card{position:relative;padding:18px;gap:9px;min-height:135px}.health-card>span{font-size:14px;font-weight:700;color:var(--muted)}.health-card strong{font-size:28px;letter-spacing:-.7px}.health-card>small{font-size:12px}.health-card::before{content:"";height:3px;width:28px;border-radius:3px;background:#83aaf2;margin-bottom:2px}.health-card:nth-child(2)::before{background:#77b4c2}.health-card:nth-child(3)::before{background:#a296d3}
.week-summary,.dashboard-chart,.goals-card,.progress-card{padding:20px;margin-top:16px}.week-summary h2,.dashboard-chart h2,.goals-card h2,.progress-card h2{font-size:17px}.week-stats>div{border-color:#c9dbf8}.week-stats strong{font-size:23px}.dashboard-chart .section-head{margin:0 0 12px}.chart-unit{font-size:12px;color:var(--muted)}.chart{width:100%;display:block;max-height:240px}.chart polyline{stroke-linecap:round;stroke-linejoin:round}.chart text{fill:var(--muted)}.chart line{stroke:var(--line)}.dashboard-charts{min-width:0}.dashboard-charts>.card{min-width:0}.dashboard-charts .chart-filters{display:none}.dashboard-charts .chart-select{display:block;width:100%;min-height:40px;padding:7px 10px;background:#f8faff;border-color:var(--line);font-size:13px}.dashboard-charts .chart-legend{margin:10px 0 4px;min-height:22px}.dashboard-charts .chart-legend .context-badge{font-size:11px!important}.progress-card p{margin:0 0 7px;font-size:14px}.progress-card .note{margin:0;color:var(--muted);font-size:12px}.goals-card dl{margin:0}.goals-card dl>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line);font-size:14px}.goals-card dd{margin:0;font-weight:700;text-align:right}.bottom a[aria-current="page"]{background:#eaf2ff;color:#1e55bc;border-radius:11px}.bottom{border-color:var(--line);background:#ffffffed;box-shadow:0 -3px 20px #244c820a}.record{border-color:var(--line)}.record .row{flex-wrap:wrap;gap:8px}.record .grow{min-width:145px}.health-modal{background:#fff}.health-modal::backdrop{background:#182e4e66}.modal-actions{background:#f9fbff}.report-footer{color:var(--muted)}.share-dialog-card{width:min(560px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto}.share-dialog-card h2{margin:0}.share-dialog-card input{font-size:14px}.share-dialog-actions{display:grid;gap:8px}.share-dialog-actions button{width:100%}.share-dialog-card .error:empty{display:none}.share-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.share-row small{color:var(--muted)}
@media screen and (min-width:760px){main[data-page="glicemia"],main[data-page="pressao"],main[data-page="frequencia"]{max-width:1040px}.bottom{max-width:992px;margin:0 auto 20px;background:#fff;padding:5px;box-shadow:0 3px 18px #244c8208}.dashboard-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.health-cards{gap:16px}.dashboard-charts .chart{max-height:250px}}
@media(max-width:420px){.top{padding:16px 14px 12px;gap:8px}.brand,.glucose-view .top .brand{font-size:18px;gap:7px}.brand-mark,.glucose-view .top .brand-mark{width:34px;height:34px;padding:7px;border-radius:10px}.header-user{max-width:19%;font-size:12px}.avatar{width:36px;min-height:36px;padding:5px;flex-shrink:0}.dashboard-heading h1{font-size:24px}.dashboard-heading{gap:8px}.dashboard-heading a{font-size:12px}.health-card{padding:14px 12px;min-height:130px}.health-card strong{font-size:22px}.health-card>span{font-size:13px}.week-summary,.dashboard-chart,.goals-card,.progress-card{padding:16px}.week-stats strong{font-size:20px}.chart-legend{gap:8px}.report-brand{white-space:normal}.report-brand small{letter-spacing:.5px}.goals-card dl>div{flex-wrap:wrap}}
@media print{body{background:#fff}.brand-mark{box-shadow:none}.card{box-shadow:none}.report-header .brand{font-family:"Atkinson Hyperlegible",sans-serif}.report-header .brand-mark{display:grid}.report-brand .brand-mark svg{width:28px;height:28px}.report-footer{font-size:10px}}
body.glucose-view .top{max-width:1080px;padding-top:20px;padding-bottom:16px}
@media(max-width:420px){body.glucose-view .top{padding-top:16px;padding-bottom:12px}}

/* Mobile layout: equal compact indicators and a measured space for fixed tabs. */
@media screen and (max-width:759px){
 :root{--nav-height:73px}
 html{scroll-padding-bottom:calc(var(--nav-height) + var(--safe-bottom) + 16px)}
 main{padding-bottom:24px}
 footer{padding-bottom:calc(var(--nav-height) + var(--safe-bottom) + 24px)}
 .bottom{height:calc(var(--nav-height) + var(--safe-bottom));padding-top:8px;padding-bottom:calc(8px + var(--safe-bottom))}
 .bottom a{height:56px;padding:4px;min-height:56px}
 .health-cards{grid-template-columns:minmax(0,1fr);gap:8px}
 .health-cards .health-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:3px;align-content:center;min-height:88px;padding:12px 14px}
 .health-card::before{position:absolute;left:0;top:18px;bottom:18px;height:auto;width:3px;margin:0}
 .health-card>span{font-size:13px;align-self:center}
 .health-card strong{font-size:23px;letter-spacing:-.4px;text-align:right;align-self:center}
 .health-card>small{grid-column:1/-1;font-size:11px;margin:0}
 .dashboard-charts .chart{max-height:none;margin-top:12px}
 .dashboard-charts .chart text{font-size:13px}
 .dashboard-chart .section-head{align-items:flex-start;gap:8px}
  /* Mobile action stays visible without covering cards or the bottom navigation. */
  main[data-page="glicemia"] .history-heading{padding-bottom:calc(76px + var(--safe-bottom))}
  main[data-page="glicemia"] .history-heading #new-reading{position:fixed;left:16px;right:16px;bottom:calc(var(--nav-height) + var(--safe-bottom) + 10px);z-index:18;width:calc(100% - 32px);min-height:50px;background:var(--green);box-shadow:0 6px 18px #153b7a33}
  .health-card strong.is-missing{color:#7f8da3;font-size:18px;font-weight:400;letter-spacing:0}
  .health-card strong.is-missing small{font-size:inherit}
}
.bottom a[aria-current="page"],.bottom a[data-active="true"]{background:#1d5bd7;color:#fff;font-weight:700;box-shadow:0 4px 12px #17469e40}
.bottom a[aria-current="page"] svg,.bottom a[data-active="true"] svg{stroke-width:2.3}
.bottom a:not([aria-current="page"]):not([data-active="true"]){color:#71819a}

