/* Monthly close (#/close): the four steps. Built from the .m-* components of frs.css; this file only adds what the design's
   markup needs around them. Tokens only (tokens.css). */
.m-close .m-step-body { display: flex; flex-direction: column; gap: 16px; animation: m-rise .3s var(--ease) backwards; }
.m-flow-step { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.m-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-close .top { border-top: 1px solid var(--line); }
.m-close .m-card__sub { padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.m-card__tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.m-card__head h2 { margin: 0; }
.m-step { font: inherit; color: inherit; }
.m-step small { min-height: 16px; }
.m-skl { display: block; height: 10px; width: 70%; border-radius: 6px; background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; animation: m-shimmer 1.6s linear infinite; }
b.m-skl { width: 55%; margin-bottom: 6px; }

/* file cards */
.m-drop { font: inherit; color: inherit; }
.m-drop .grow { flex: 1; min-width: 0; }
.m-drop b { overflow-wrap: anywhere; }
.m-drop[data-s="off"] { cursor: default; border-style: solid; background: var(--surface); }
.m-drop[data-s="off"]:hover { border-color: var(--line-2); background: var(--surface); }
.m-drop[data-s="busy"] { cursor: progress; border-color: var(--brand-line); background: var(--brand-tint); }
.m-drop[data-s="done"] { cursor: default; }
.m-drop[data-s="done"]:hover { border-color: var(--ok-tint); background: var(--surface); }
.m-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand-line); border-top-color: var(--brand); animation: m-spin .8s linear infinite; }
.m-toggle { align-self: flex-start; }
.m-toggle .sr { position: absolute; opacity: 0; }
.m-toggle input:focus-visible + .m-switch { outline: var(--focus-ring); outline-offset: 2px; }

/* result strip */
.m-facts b.bad { color: var(--coral-text); }
.m-facts b.sm { font-size: 20px; }
.m-facts b small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.m-check > .st { padding: 0; gap: 0; justify-content: center; font-weight: inherit; }
.m-check > .st::before { display: none; }
.m-check .m-act { min-width: 0; }
.m-checkrow + .m-checkrow { border-top: 1px solid var(--line); }
.m-checkrow .m-check { border-top: 0; }
.m-check-x { padding: 0 20px 12px 62px; }
.m-check p { overflow-wrap: anywhere; }
.m-divide > .m-check + .m-check { border-top: 1px solid var(--line); }

/* steps footer */
.m-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m-nav.end { justify-content: flex-end; }
.m-nav__mid { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.m-nav__mid + .m-btn, .m-nav__mid + span { margin-left: 8px; }
.m-pub { animation: m-pop .45s var(--ease-pop) both; }

/* tasks */
.m-taskrow + .m-taskrow { border-top: 1px solid var(--line); }
.m-task-extra { padding: 0 20px 14px 70px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.m-linkword { font-size: 13px; font-weight: 500; color: var(--brand-deep); text-align: right; }
.m-run { display: inline-flex; align-items: center; gap: 6px; }
.m-input--date { height: 30px; width: 138px; padding: 0 8px; font-size: 13px; border-radius: 8px; }
.m-empty-row { padding: 18px 20px; color: var(--ink-3); }
.m-empty-row.top { border-top: 1px solid var(--line); }
a.m-task { text-decoration: none; }
.m-task .m-ic { justify-self: end; }

/* inline forms, notes and errors */
.m-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.m-inline .grow { flex: 1 1 260px; }
.m-field.grow { min-width: 220px; }
.m-area { height: auto; min-height: 56px; padding: 8px 12px; resize: vertical; width: 100%; line-height: 20px; }
.m-err { color: var(--coral-text); font-size: 13px; font-weight: 500; }
.m-why { display: block; font-size: 12.5px; line-height: 17px; color: var(--ink-3); white-space: normal; overflow: visible; text-overflow: clip; }
.m-why.warn { color: var(--warn); }
.m-why.r { text-align: right; margin-top: 4px; }
.m-note { padding: 10px 14px; border-radius: var(--r-md); background: var(--sunken); color: var(--ink-2); font-size: 13.5px; line-height: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.m-note > div { flex: 1 1 260px; }
.m-note.ok { background: var(--ok-tint); color: var(--ok); }
.m-note.warn { background: var(--warn-tint); color: var(--warn); }
.m-note.bad { background: var(--bad-tint); color: var(--bad); }
.m-note.info { background: var(--info-tint); color: var(--info); }

/* review rows */
.m-review { align-items: start; }
.m-rl, .m-rm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-rl b { white-space: normal; overflow-wrap: anywhere; }
.m-rl small { white-space: normal; }
.m-rm .m-select { max-width: 100%; }
.m-rm .m-input { width: 100%; max-width: 420px; height: 32px; }
.m-review .m-act { align-items: center; flex-wrap: wrap; max-width: 330px; }
.m-review .m-why { white-space: normal; }
.m-review .m-act .m-why { text-align: right; }
.m-arrow { flex-wrap: wrap; }

/* manual entries */
.m-entries td.wrap { white-space: normal; min-width: 160px; max-width: 260px; }
.m-entries td { vertical-align: top; }
.m-entries td .m-badge { margin-top: 6px; }
.m-entries .m-badge + .m-badge { margin-left: 6px; }
.m-entry-t { display: flex; align-items: flex-start; gap: 8px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.m-entry-chev { display: inline-flex; margin-top: 2px; color: var(--ink-3); transition: transform .15s ease; }
.m-entry-t[aria-expanded="true"] .m-entry-chev { transform: rotate(90deg); }
.m-entry-t .id { display: block; color: var(--ink); font-weight: 500; }
.m-entry.confirmed td, .m-entry.rejected td { color: var(--ink-3); }
.m-entry-x td { background: var(--canvas); padding: 12px 20px; white-space: normal; height: auto; }
.m-entry-detail { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-entry-detail .tw { overflow-x: auto; }
.m-entry-detail table { width: 100%; }
.m-entry-detail .facts { margin: 0; }
.m-return { align-items: flex-start; }
.m-addentry { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.m-addentry .me-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.m-addentry .me-form .me-act, .m-addentry .me-form .m-err, .m-addentry .me-form .m-note, .m-addentry .me-form .m-why { grid-column: 1 / -1; }
.m-addentry .me-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m-addentry .me-body { min-width: 0; }

/* folds, filters, small controls */
.m-fold { border-top: 1px solid var(--line); }
.m-fold > summary { display: flex; align-items: center; gap: 8px; padding: 12px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.m-fold > summary::-webkit-details-marker { display: none; }
.m-fold > summary .m-ic { transition: transform .15s ease; }
.m-fold[open] > summary .m-ic { transform: rotate(90deg); }
.m-fold > summary .muted { font-weight: 500; font-size: 13px; }
.m-fold > .m-tablewrap { border-top: 1px solid var(--line); }
.m-fold .m-tablewrap + .m-filters { border-top: 1px solid var(--line); }
.m-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px; }
.m-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--brand-deep); cursor: pointer; text-align: left; }
.m-linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-table tr.on td { background: var(--brand-tint); }
.m-table tr.click { cursor: pointer; }
.m-table .paren { color: var(--bad); }
.m-tools { border-top: 0; }
.m-toollinks { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 14px; }
.m-tools[open] { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.m-tools:not([open]) > summary { padding-left: 4px; color: var(--ink-2); }
.m-banner p { margin: 2px 0 0; }
.m-close .mj-dorm { border-top: 1px solid var(--line); }
.m-close .mj-dorm > summary { padding: 12px 20px; }
.m-close .mj-dorm .tw { padding: 0 20px 12px; }
.m-close .mj-dorm .bd { padding: 0 20px 12px; }

@media (max-width: 1100px) { .m-two { grid-template-columns: minmax(0, 1fr); } .m-review { grid-template-columns: minmax(0, 1fr); } .m-review .m-act { max-width: none; justify-content: flex-start; } }
.m-chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
