/* Your week, Your orders and Your plan, dated (wave 9 Task 9). Every colour is a var(--r-*)
   token from the shell; this file types no hex. Boards: A5-week, A5-phone, C-week-overdue,
   C-cash-age, C-month-turn, A6-orders-board, A6-phone, Orders, C-orders-dated, A2-plan,
   A2-phone, C-plan-dated. Class prefix rw-. Motion comes from the shell's primitives only. */

.rw-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;min-width:0}
.rw-example{color:var(--r-muted);border:1px solid var(--r-rule);background:var(--r-surface);border-radius:999px;padding:2px 12px;max-width:100%}
.rw-lead{margin:0;font-size:19px;line-height:1.45;color:var(--r-muted);max-width:60ch}
.rw-muted{color:var(--r-muted)}
.rw-link{display:inline-flex;align-items:center;min-height:44px;font-weight:700}
.rw-links{display:flex;flex-wrap:wrap;gap:4px 24px;align-items:center}
.rw-line{display:block}
.rw-past{color:var(--r-muted);font-style:italic}

/* Cards. */
.rw-card{background:var(--r-surface);border:1px solid var(--r-rule);border-radius:12px;padding:24px 28px;display:flex;flex-direction:column;gap:12px;min-width:0}
.rw-card-title{margin:0;font-size:22px;line-height:1.25;font-weight:700}
.rw-sub{margin:8px 0 0;font-size:19px}

/* The business's cash, with the Load Line beside its figure. */
.rw-cash{border-left:6px solid var(--r-muted)}
.rw-cash-holds{border-left-color:var(--r-holds)}
.rw-cash-breaks{border-left-color:var(--r-breach)}
.rw-verdict-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:22px}
.rw-verdict-figure{font-size:19px;line-height:1.45}
.rw-cash-text{display:flex;flex-direction:column;gap:10px;min-width:0;flex:1 1 auto}
.rw-cash-sentence{font-size:20px;line-height:1.4;font-weight:700}
.rw-cash-figure{display:flex;align-items:center;justify-content:space-between;gap:12px 20px;min-width:0}
.rw-cash-figure-text{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:22px;min-width:0}
.rw-figure-label{font-size:17px;color:var(--r-muted)}
.rw-cash-figure .r-ll{flex:0 0 auto}

/* Status lines. */
.rw-status{border-left:4px solid var(--r-holds);background:var(--r-tint);padding:12px 16px;border-radius:4px}
.rw-status-refused{border-left-color:var(--r-breach)}
.rw-status-cash{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}

/* An overdue question (C-week-overdue, C-orders-dated). */
.rw-ask{background:var(--r-surface);border:2px solid var(--r-breach);border-radius:12px;padding:24px 28px;display:flex;flex-direction:column;gap:14px;min-width:0;scroll-margin-top:16px}
.rw-ask-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.rw-ask-title{margin:0;font-size:24px;line-height:1.25;font-weight:700}
.rw-ask-body{font-size:19px;line-height:1.45}
.rw-ask-figure{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.rw-overdue{display:inline-flex;align-items:center;gap:6px;border:2px solid var(--r-breach);color:var(--r-breach);background:var(--r-surface);border-radius:4px;padding:2px 8px;font-weight:700;max-width:100%}
.rw-clock{fill:none;stroke:var(--r-breach);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.rw-overdue-mark{color:var(--r-breach);font-weight:700}
.rw-note{color:var(--r-muted)}
.rw-ask-form,.rw-close-form{display:flex;flex-direction:column;gap:16px}
.rw-close-form>.rw-button,.rw-offer>.rw-button,.rw-water-form>.rw-button{align-self:flex-start}
.rw-options{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap;gap:12px;min-width:0}
.rw-legend{font-weight:700;padding:0 0 8px}
.rw-opt{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:0 16px;border:1px solid var(--r-muted);border-radius:8px;background:var(--r-surface);font-weight:500;cursor:pointer}
.rw-opt:has(input:checked){border:2px solid var(--r-anchor);background:var(--r-tint);font-weight:700}
.rw-opt input,.rw-tick input{width:20px;height:20px;margin:0;accent-color:var(--r-anchor);flex:0 0 auto}
.rw-fields{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 24px}
.rw-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.rw-field label{font-weight:700}
.rw-input{min-height:48px;box-sizing:border-box;border:1px solid var(--r-muted);border-radius:8px;padding:0 12px;font:inherit;font-size:17px;color:var(--r-ink);background:var(--r-surface);width:240px;max-width:100%}
.rw-input-short{width:160px}
.rw-file{font:inherit;min-height:48px;max-width:100%}
.rw-button{min-height:48px;padding:0 20px;border:2px solid var(--r-anchor);border-radius:8px;background:var(--r-surface);color:var(--r-anchor);font:inherit;font-weight:700;cursor:pointer}
.rw-button:hover{background:var(--r-tint)}
.rw-button-primary{min-height:52px;background:var(--r-anchor);color:var(--r-surface)}
.rw-button-primary:hover{background:var(--r-anchor-hover)}

/* The close (A5-week, ruling 311). */
.rw-close{background:var(--r-surface);border:2px solid var(--r-anchor);border-radius:12px;padding:24px 28px;display:flex;flex-direction:column;gap:14px;min-width:0;scroll-margin-top:16px}
.rw-q{font-weight:700;font-size:19px}
.rw-hint{color:var(--r-muted);display:block}
.rw-money-input{display:inline-flex;align-items:center;gap:8px;max-width:100%}
.rw-symbol{font-weight:700}
.rw-close-units{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:12px;min-width:0}
.rw-tick{display:flex;align-items:flex-start;gap:12px;min-height:44px;cursor:pointer}
.rw-tick input{margin-top:3px}
.rw-tick-text{display:flex;flex-direction:column;gap:4px;min-width:0}

/* The cash the plan starts from (C-cash-age). */
.rw-age-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:19px}
.rw-offer{border-top:1px solid var(--r-rule);padding-top:14px;display:flex;flex-direction:column;gap:12px}
.rw-offer-head{font-weight:700}

/* This month, next month, the next three months. */
.rw-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.rw-period{border:1px solid var(--r-rule);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.rw-period-head{display:flex;flex-direction:column;gap:2px}
.rw-period-when{color:var(--r-muted)}
.rw-period-figures{margin:0;display:flex;flex-direction:column;gap:8px}
.rw-period-figures>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;border-top:1px solid var(--r-rule);padding-top:8px}
.rw-period-figures dt{color:var(--r-muted)}
.rw-period-figures dd{margin:0;text-align:right;font-weight:700}

/* What is due. */
.rw-due{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px}
.rw-due-product{border-top:1px solid var(--r-rule);padding-top:12px;display:flex;flex-direction:column;gap:6px}
.rw-due-label{margin:0;font-size:19px}
.rw-due-items{margin:0;padding-left:20px}

/* The strip on Your orders. */
.rw-strip{margin:0;display:flex;flex-wrap:wrap;gap:12px 32px;background:var(--r-tint);border-radius:8px;padding:16px 20px}
.rw-strip dt{color:var(--r-muted)}
.rw-strip dd{margin:0;font-weight:700}
.rw-strip dd.rw-muted{font-weight:400}

/* The board (A6-orders-board, C-orders-dated). Cards never drag across months. */
.rw-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.rw-column{background:var(--r-tint);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:12px;min-width:0}
.rw-column-title{margin:0;font-size:17px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.rw-count{border:1px solid var(--r-ink);border-radius:999px;min-width:28px;text-align:center;padding:0 8px;font-weight:500}
.rw-order{background:var(--r-surface);border:1px solid var(--r-rule);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:6px;min-width:0;overflow-wrap:anywhere}
.rw-order-late{border:2px solid var(--r-breach)}
.rw-card-form{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.rw-card-form .rw-input{width:100%}
.rw-confirm{border-top:1px solid var(--r-rule);padding-top:14px;margin-top:14px;max-width:560px}
.rw-confirm-for{margin:0}
.rw-confirm-link{white-space:nowrap}

/* Tables: ruled rows; on a phone each row stacks into a labelled block. */
.rw-table{width:100%;border-collapse:collapse}
.rw-table caption{text-align:left}
.rw-table th,.rw-table td{padding:10px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--r-rule);overflow-wrap:break-word}
.rw-table thead th{font-weight:500;color:var(--r-muted)}
.rw-table tbody th{font-weight:700}
.rw-row-late th:first-child{box-shadow:inset 4px 0 0 var(--r-breach)}
.rw-group th{background:var(--r-tint);color:var(--r-muted);font-weight:700}
.rw-cash-cell{display:flex;flex-direction:column;gap:6px;min-width:0}
.rw-cash-cell .r-bar-track{max-width:220px}
.rw-preview{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px}

/* Folded sections. */
.rw-fold{background:var(--r-surface);border:1px solid var(--r-rule);border-radius:12px;padding:4px 28px}
.rw-fold-body{display:flex;flex-direction:column;gap:14px;padding:4px 0 24px;min-width:0}
.rw-water-form{display:flex;flex-direction:column;gap:16px}
.rw-water-row{margin:0;border:1px solid var(--r-rule);border-radius:8px;padding:12px 16px 16px;display:flex;flex-wrap:wrap;gap:12px 20px;min-width:0}
.rw-upload{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 20px}

@media (max-width:1023px){
  .rw-board{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phone (767px and under): one column, tables stacked, nothing wider than the screen. */
@media (max-width:767px){
  .rw-card,.rw-ask,.rw-close{padding:18px 16px}
  .rw-fold{padding:2px 16px}
  .rw-cash-figure-text{font-size:19px}
  .rw-cash-sentence{font-size:19px}
  .rw-ask-title{font-size:21px}
  .rw-periods{grid-template-columns:minmax(0,1fr)}
  .rw-board{grid-template-columns:minmax(0,1fr)}
  .rw-input,.rw-input-short{width:100%}
  .rw-field{width:100%}
  .rw-fields .rw-button,.rw-close-form>.rw-button,.rw-offer>.rw-button,.rw-water-form>.rw-button{width:100%;align-self:stretch}
  .rw-table,.rw-table tbody,.rw-table tr,.rw-table th,.rw-table td{display:block;width:100%}
  .rw-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .rw-table tr{border-bottom:1px solid var(--r-rule);padding:8px 0}
  .rw-table th,.rw-table td{border-bottom:0;padding:4px 0}
  .rw-table td[data-label]:not(:empty)::before{content:attr(data-label);display:block;color:var(--r-muted)}
  .rw-table td:empty{display:none}
  .rw-row-late th:first-child{box-shadow:none;border-left:4px solid var(--r-breach);padding-left:8px}
}

/* Task 9b: today's features on the reform's week. Tokens only. */
.rw-welcome{margin:0;font-size:19px;line-height:1.45}
.rw-modes{display:flex;flex-wrap:wrap;gap:4px 8px}
.rw-mode{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border:1px solid var(--r-rule);border-radius:999px;background:var(--r-surface);font-weight:500}
.rw-mode-current{border-color:var(--r-ink);font-weight:700}
.rw-late{border-left:6px solid var(--r-breach)}
.rw-late-line{margin:0;font-weight:700}
.rw-logged{display:flex;flex-direction:column;gap:8px;min-width:0;padding-top:8px;border-top:1px solid var(--r-rule)}
.rw-demand-row{display:flex;flex-direction:column;gap:6px;padding-bottom:8px;border-bottom:1px solid var(--r-rule)}

/* The plan's chart, the order edit, the floor box. Tokens only. */
.rw-chart{margin:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.rw-svg{width:100%;height:auto;max-width:560px;display:block}
.rw-svg-axis{stroke:var(--r-rule);stroke-width:1}
.rw-svg-floor{stroke:var(--r-breach);stroke-width:1.5;stroke-dasharray:5 4}
.rw-svg-in{fill:var(--r-holds)}
.rw-svg-out{fill:var(--r-muted)}
.rw-svg-line{stroke:var(--r-ink);stroke-width:2}
.rw-svg-point{fill:var(--r-ink)}
.rw-svg-under{fill:var(--r-breach)}
.rw-svg-text{fill:var(--r-muted);font-size:11px}
.rw-chart-key{display:flex;flex-wrap:wrap;gap:4px 16px;color:var(--r-muted)}
.rw-key::before{content:"";display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:-1px;border-radius:2px}
.rw-key-in::before{background:var(--r-holds)}
.rw-key-out::before{background:var(--r-muted)}
.rw-key-cash::before{background:var(--r-ink);height:3px;vertical-align:3px}
.rw-key-floor::before{background:transparent;border-top:2px dashed var(--r-breach);height:0;border-radius:0;vertical-align:3px}
.rw-edit{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.rw-payback{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;margin:0}
.rw-range{width:100%;min-height:44px}

/* Your orders, Task 9b: the order ladder, the purchase order draft. Tokens only. */
.rw-po-tag{margin:0;display:inline-block;align-self:flex-start;padding:2px 12px;border:2px solid var(--r-ink);border-radius:6px;letter-spacing:0.04em}
.rw-po-rows{display:flex;flex-direction:column;margin:0}
.rw-po-rows>div{display:grid;grid-template-columns:minmax(0,9rem) minmax(0,1fr);gap:4px 16px;padding:8px 0;border-bottom:1px solid var(--r-rule)}
.rw-po-rows dt{color:var(--r-muted)}
.rw-po-rows dd{margin:0}
@media (max-width:767px){.rw-po-rows>div{grid-template-columns:minmax(0,1fr)}}
@media print{.rw-card:not(.rw-po),.rw-fold,.rw-lead,nav,header,footer{display:none!important}.rw-po{border:0}}
