/* Signed-in pages: greeting, fresh cards, icons, approvals. Loaded after site.css and ops.css. */

:root {
  --indigo: #26337e;
  --sky: #3b6fe0;
  --mint: #1fa463;
  --soft-shadow: 0 1px 2px rgba(28, 39, 84, .06), 0 8px 24px -12px rgba(28, 39, 84, .22);
  --lift-shadow: 0 2px 4px rgba(28, 39, 84, .08), 0 16px 32px -14px rgba(28, 39, 84, .32);
}

/* ---------- Greeting banner ---------- */
.greet {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #26337e 0%, #3b52c4 55%, #5a7bf0 100%);
  color: #fff;
}
.greet-in { max-width: 84rem; margin: 0 auto; padding: 1.1rem var(--gutter); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.greet-hi { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 3.2vw, 2rem); line-height: 1.15; }
.greet-hi b { color: var(--pencil); }
.greet-sub { margin: .1rem 0 0; opacity: .9; font-size: .98rem; }
.greet-sun { flex: none; width: 2.6rem; height: 2.6rem; color: var(--pencil); animation: spin 28s linear infinite; }
.greet-chip { margin-left: auto; padding: .35rem .9rem; border-radius: 999px; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.4); font-weight: 700; font-size: .9rem; }
.greet::before, .greet::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255,255,255,.08); animation: drift 14s ease-in-out infinite alternate; }
.greet::before { width: 14rem; height: 14rem; right: -3rem; top: -7rem; }
.greet::after { width: 9rem; height: 9rem; right: 22%; bottom: -5rem; animation-duration: 19s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translate(-30px, 12px) scale(1.12); } }

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem 1.25rem; margin-bottom: .5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; }
.portal-main h1 { position: relative; padding-bottom: .35rem; }
.portal-main h1::after { content: ""; display: block; width: 3.2rem; height: 5px; border-radius: 4px; background: var(--pencil); margin-top: .35rem; }
.page-head h1::after { display: none; }

/* ---------- Cards ---------- */
.portal .panel, .dash .panel {
  border: 1.5px solid #dbe5f7; border-radius: 16px; box-shadow: var(--soft-shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.portal .panel:hover { box-shadow: var(--lift-shadow); border-color: #c3d3f3; }
.portal .form-card { border-radius: 16px; border: 1.5px solid #cdd9f3; box-shadow: var(--soft-shadow); }
.portal .tile { border-radius: 14px; border: 1.5px solid #dbe5f7; border-left-width: 5px; box-shadow: var(--soft-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.portal a.tile:hover { transform: translateY(-3px); box-shadow: var(--lift-shadow); }
.portal .stat { border-radius: 12px; }
.panel h2 { display: flex; align-items: center; gap: .5rem; }
.all-clear { text-align: center; background: linear-gradient(135deg, #effaf3, #fff); }
.all-clear h2 { justify-content: center; color: var(--leaf); }
.attention { border-color: #f1b8b4 !important; background: #fff7f6; }

/* ---------- Side menu with icons ---------- */
.portal-side { border: 1.5px solid #dbe5f7; border-radius: 18px; box-shadow: var(--soft-shadow); background: linear-gradient(180deg, #fff, #f7faff); }
.portal-name { border-bottom-color: var(--pencil); }
.portal-nav a { position: relative; justify-content: flex-start; gap: .65rem; transition: background .15s ease, transform .15s ease, padding .15s ease; }
.portal-nav a .nlabel { flex: 1; }
.portal-nav a:hover { background: #eaf0ff; transform: translateX(3px); }
.portal-nav a[aria-current="page"] { background: linear-gradient(90deg, var(--pencil), #ffe08a); box-shadow: 0 4px 12px -6px rgba(233, 172, 18, .8); }
.ni { flex: none; width: 1.2rem; height: 1.2rem; background: currentColor; opacity: .8; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.portal-nav a[aria-current="page"] .ni { opacity: 1; }
.ni[data-i="dot"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
.ni[data-i="home"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8M5 10v10h14V10M10 20v-6h4v6'/%3E%3C/svg%3E"); }
.ni[data-i="calendar"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ni[data-i="book"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M9 7h6'/%3E%3C/svg%3E"); }
.ni[data-i="chart"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-8M22 20H2'/%3E%3C/svg%3E"); }
.ni[data-i="photo"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M21 17l-5-5-9 7'/%3E%3C/svg%3E"); }
.ni[data-i="pencil"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1 11-11-3-3L5 16z'/%3E%3C/svg%3E"); }
.ni[data-i="bell"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16v-5a6 6 0 0 1 12 0v5l2 2H4zM10 21h4'/%3E%3C/svg%3E"); }
.ni[data-i="mail"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E"); }
.ni[data-i="user"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.ni[data-i="bus"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='13' rx='2'/%3E%3Cpath d='M4 11h16M7 20v-3M17 20v-3'/%3E%3C/svg%3E"); }
.ni[data-i="doc"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.ni[data-i="shield"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3C/svg%3E"); }
.ni[data-i="money"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 8h6M9 12h6M10 8c4 0 4 5 0 5l4 4'/%3E%3C/svg%3E"); }
.ni[data-i="check"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.ni[data-i="cog"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M5 5l2 2M17 17l2 2M19 5l-2 2M7 17l-2 2'/%3E%3C/svg%3E"); }
.ni[data-i="camera"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E"); }
.ni[data-i="send"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-8-8 18-2-8z'/%3E%3C/svg%3E"); }
.ni[data-i="star"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9z'/%3E%3C/svg%3E"); }
.ni[data-i="clipboard"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4' width='12' height='17' rx='2'/%3E%3Cpath d='M9 4h6v3H9zM9 13l2 2 4-4'/%3E%3C/svg%3E"); }
.ni[data-i="box"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 7l9-4 9 4v10l-9 4-9-4zM3 7l9 4 9-4M12 11v10'/%3E%3C/svg%3E"); }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .greet-sun, .greet::before, .greet::after { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Approval status ---------- */
.st { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .01em; }
.st-pending { background: #fff3d6; color: #7a5200; }
.st-approved { background: #dff7ec; color: #0b4a2b; }
.st-returned { background: #ffe3e3; color: #8a1111; }
.st-none { background: #eef0f8; color: #4a5580; }
.st-note { font-style: italic; color: var(--ink-soft); font-size: .9rem; }

.approve-card { border: 1.5px solid #dbe5f7; border-left: 5px solid var(--pencil); border-radius: 14px; padding: .9rem 1rem; margin-top: .9rem; background: #fff; }
.approve-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin-bottom: .4rem; }
.approve-body p { margin: 0 0 .4rem; }
.approve-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.approve-actions input[type="text"] { flex: 1 1 14rem; min-width: 0; font: inherit; padding: .45rem .7rem; border: 2px solid var(--rule); border-radius: 10px; background: var(--paper); }
.photo-actions { display: grid; gap: .35rem; margin-top: .4rem; }
.photo-actions input[type="text"] { font: inherit; padding: .35rem .6rem; border: 2px solid var(--rule); border-radius: 8px; background: var(--paper); min-width: 0; width: 100%; }

.waiting { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.waiting-card { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 16px; background: #fff; border: 1.5px solid #dbe5f7; text-decoration: none; color: var(--ink); box-shadow: var(--soft-shadow); transition: transform .2s ease, box-shadow .2s ease; font-weight: 700; }
.waiting-card:hover { transform: translateY(-3px); box-shadow: var(--lift-shadow); color: var(--ink); }
.waiting-n { flex: none; min-width: 2.6rem; height: 2.6rem; display: grid; place-items: center; padding: 0 .4rem; border-radius: 12px; background: #eaf0ff; color: var(--indigo); font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; }
.waiting-card.has-work { border-color: #f1b8b4; background: #fff7f6; }
.waiting-card.has-work .waiting-n { background: var(--margin); color: #fff; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 70, 79, .45); } 50% { box-shadow: 0 0 0 9px rgba(226, 70, 79, 0); } }

/* ---------- Lists and filters ---------- */
.list-filter { width: 100%; max-width: 26rem; font: inherit; padding: .55rem .9rem .55rem 2.4rem; margin: 0 0 .7rem; border: 2px solid var(--rule); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5580' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") .8rem center / 1.1rem no-repeat; color: var(--ink); }
.list-filter:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(59, 111, 224, .18); }
.scroll-box { max-height: 22rem; overflow-y: auto; padding-right: .5rem; border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); scrollbar-width: thin; }
.scroll-box:focus-visible { outline: 3px solid var(--sky); }
.scroll-box ul { margin: 0; padding: .4rem 0; }
.scroll-box li { padding: .35rem 0; border-bottom: 1px dashed var(--rule); }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; padding: .6rem .3rem; border-bottom: 1.5px solid var(--rule); transition: background .15s ease; }
.pick-list li:hover { background: #f3f7ff; }
.pick-list a { font-weight: 700; flex: 1 1 10rem; }
.meter { height: 10px; border-radius: 999px; background: #e6ecfa; overflow: hidden; margin: .4rem 0 1rem; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--mint)); border-radius: inherit; transition: width .8s ease; }
.month-pick { margin: .4rem 0; display: inline-flex; gap: .6rem; align-items: center; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 .2rem; }
.filter-chips .chip { border: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Rings, facts, diary ---------- */
.ring { --p: 0; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; margin-bottom: .2rem;
  background: conic-gradient(var(--mint) calc(var(--p) * 1%), #e3eaf9 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: .42rem; background: #fff; border-radius: 50%; }
.ring b { position: relative; font-size: .78rem; font-family: var(--font-display); }
.tile-alert .ring { background: conic-gradient(var(--margin) calc(var(--p) * 1%), #e3eaf9 0); }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr; gap: .2rem .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.facts dt { color: var(--ink-soft); font-weight: 700; font-size: .92rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.diary-section { border-left: 4px solid #cfe0ff; padding: .1rem 0 .1rem .8rem; margin: .7rem 0; }
.diary-section h3 { margin: 0 0 .15rem; font-size: .95rem; color: var(--indigo); }
.diary-section p { margin: 0; }
.diary-remind { border-left-color: var(--pencil); background: #fffbea; border-radius: 0 10px 10px 0; }
.next-up { display: grid; gap: .1rem; padding: .7rem 1rem; border-radius: 14px; background: linear-gradient(135deg, #fff4cc, #ffe08a); border: 1.5px solid #e9c64e; min-width: 12rem; }
.next-up strong { font-family: var(--font-display); font-size: 1.15rem; }
.cal-list .event { transition: background .15s ease; border-radius: 10px; padding-left: .4rem; }
.cal-list .event:hover { background: #f3f7ff; }
.cal-list .event[hidden] { display: none; }
.photo-grid .photo { border-radius: 14px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.photo-grid .photo:hover { transform: translateY(-3px); box-shadow: var(--lift-shadow); }

/* ---------- Dashboards pages now use the portal layout ---------- */
.dash h1 { margin-bottom: .2rem; }
.dash .stats { margin-top: 1rem; }

@media (max-width: 640px) {
  .greet-sun { display: none; }
  .greet-chip { margin-left: 0; }
  .facts div { grid-template-columns: 1fr; }
}
@media print { .greet { display: none !important; } }

/* ---------- Round 3 fixes: compact page headers, side menu scroll ---------- */
/* The public site gives .page-head a big blue banner; inside the signed-in portal it must stay a plain heading. */
.portal .page-head, .portal-main .page-head {
  background: none; color: var(--ink); padding: 0 0 .35rem; margin: 0 0 .75rem; border-radius: 0;
  align-items: center; justify-content: space-between;
}
.portal .page-head h1, .portal-main .page-head h1 { color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.portal .page-head p, .portal .page-head .page-intro, .portal .page-head .muted { color: var(--ink-soft); opacity: 1; font-size: 1rem; line-height: 1.45; }
.portal .page-head .page-intro { margin-top: .25rem; }
.date-chip { padding: .35rem .9rem; border-radius: 999px; background: #eaf0ff; border: 1.5px solid #c9d7f6; color: var(--ink); font-weight: 700; font-size: .92rem; white-space: nowrap; margin-left: auto; }

/* Side menu: stays in view and scrolls by itself when it is taller than the window. */
@media (min-width: 861px) {
  .portal-side { position: sticky; top: .75rem; max-height: calc(100vh - 1.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .portal-side::-webkit-scrollbar { width: 6px; }
  .portal-side::-webkit-scrollbar-thumb { background: #c3d3f3; border-radius: 6px; }
}
.crumb .btn { padding: .3rem .8rem; }

/* To-do groups */
.todo-group { margin: 1rem 0 .35rem; font-size: 1rem; display: flex; align-items: baseline; gap: .6rem; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.todo-group span { font-size: .82rem; text-transform: none; letter-spacing: 0; color: var(--ink-soft); font-weight: 600; }
.todo-group:first-of-type { margin-top: .4rem; }

/* Progress comment picker */
.phrase-pick { display: grid; gap: .35rem; min-width: 0; }
.phrase-pick select, .phrase-pick input { width: 100%; }
.phrase-pick .own-note[hidden] { display: none; }
.issue-list li { padding: .55rem 0; border-bottom: 1px solid #e5ecf8; }

.att-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.att-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .6rem 0; border-bottom: 1px solid #e5ecf8; }
.inv-list li { padding: .6rem 0; border-bottom: 1px solid #e5ecf8; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.homework-line { background: #fff8e1; border-left: 4px solid var(--pencil); padding: .4rem .7rem; border-radius: 6px; }
.small-title { font-size: 1rem; margin: 1rem 0 .3rem; }
.group-title { margin: 1.25rem 0 .5rem; font-size: 1.25rem; text-align: left; }
.diary-fold { margin-bottom: .6rem; }
.diary-fold > summary { cursor: pointer; list-style: none; display: flex; gap: .6rem; align-items: center; padding: .15rem 0; }
.diary-fold[open] > summary { margin-bottom: .6rem; }
.diary-homework { background: #fff8e1; border-left: 4px solid var(--pencil); padding: .4rem .8rem; border-radius: 6px; }

/* All-classes table */
.matrix td, .matrix th { white-space: nowrap; }
.matrix .cell-ok { background: #effaf3; color: #14683f; font-weight: 700; }
.matrix .cell-warn { background: #fff1f0; color: #a3262c; font-weight: 700; }
.matrix .cell-wait { background: #fff8e1; color: #7a5600; font-weight: 700; }
.matrix .cell-none { color: var(--ink-soft); }

.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.track h3 { margin: 0 0 .3rem; font-size: 1rem; }
.track .big { font-size: 1.8rem; font-weight: 800; margin: 0; }
.track .big small { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.panel.is-warn { border-left: 4px solid #d9822b; }
