/* 経費精算。style.css と flow.css の上に重ねる（接頭辞 ex-） */
.fhead p a, .srcl a, .ex-go a { color: #1d4ed8; text-underline-offset: 2px; }
.hint { display: inline-block; vertical-align: middle; font-size: 10.5px; font-weight: 700; line-height: 1.5; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 999px; padding: 0 8px; margin-left: 6px; white-space: nowrap; }
.srcl { display: block; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ex-go { margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.ex-go a { text-decoration: none; }
.ex-go a:hover { text-decoration: underline; }
.ex-sub { margin: 22px 0 8px; font-size: 15.5px; }

/* カード */
.ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ex-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ex-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ex-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 16px; }
.ex-card > b { font-size: 14px; }
.ex-card p { margin: 5px 0 0; font-size: 13px; color: var(--ink2); }
.ex-card ul { margin: 6px 0 0; padding-left: 1.15em; display: grid; gap: 4px; font-size: 13px; color: var(--ink2); }
.ex-card .srcl { margin-top: auto; padding-top: 8px; }
.ex-card.ai { background: #faf8ff; border-color: #dccdfb; }
.ex-card.ai > b::before { content: "AI"; font-family: var(--latin); font-size: 10.5px; font-weight: 600; background: #ede9fe; color: #5b21b6; border-radius: 5px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.ex-card:target { border-color: #2563eb; box-shadow: 0 0 0 3px #bfdbfe; }

/* 切り替え */
.ex-seg2 { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: var(--line2); margin-bottom: 10px; }
.ex-seg2 button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); border-radius: 11px; padding: 6px 14px; cursor: pointer; }
.ex-seg2 button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.ex-seg2.small button { font-size: 12.5px; padding: 5px 11px; }

/* 業務の流れ */
.ex-flow { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.ex-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; position: relative; }
.ex-step { appearance: none; width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; }
.ex-step:hover { border-color: #94a3b8; }
.ex-step.on { border-color: #0d9488; background: #f0fdfa; }
.ex-sn { width: 26px; height: 26px; border-radius: 50%; background: var(--line2); color: var(--ink2); font: 600 12.5px/26px var(--latin); text-align: center; display: inline-block; }
.ex-step.on .ex-sn { background: #0d9488; color: #fff; }
.ex-st { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ex-st b { font-size: 14px; }
.ex-st small { font-size: 12px; color: var(--muted); }
.ex-panel { position: sticky; top: 12px; padding: 14px 16px; min-width: 0; }
.ex-k { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ex-panel h3 { margin: 6px 0 6px; font-size: 17px; }
.ex-panel > p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.ex-dl { margin: 0; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.ex-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 2px; }
.ex-dl dd { margin: 0; color: var(--ink2); }
.ex-nav { display: flex; gap: 6px; margin-top: 12px; }
.ex-nav button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.ex-nav button[disabled] { color: #94a3b8; cursor: default; }

/* 書類を 1 行ずつ読む */
.ex-read { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ex-docbox { background: #fffef9; border: 1px solid #e7e2cf; border-radius: 12px; padding: 10px 0 12px; min-width: 0; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.ex-path { margin: 0 14px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ex-lines { font-family: var(--latin); font-size: 13px; line-height: 1.55; overflow-x: auto; }
.ex-ln { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 14px; border: 0; border-left: 3px solid transparent; background: transparent; color: var(--ink); font: inherit; text-align: left; }
button.ex-ln { cursor: pointer; }
button.ex-ln:hover { background: #f4f1e4; }
.ex-ln.on { background: #fef9c3; border-left-color: #ca8a04; }
.ex-ln.plain { color: var(--ink2); }
.ex-tx { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; flex: 1; }
.ex-tag { flex: none; min-width: 22px; height: 22px; border-radius: 50%; background: #e7e2cf; color: var(--ink); font: 600 12px/22px var(--sans); text-align: center; }
.ex-ln.on .ex-tag { background: #ca8a04; color: #fff; }
.ex-no { width: 24px; height: 24px; border-radius: 50%; background: #ca8a04; color: #fff; font: 600 12.5px/24px var(--sans); text-align: center; }

/* 経過措置の帯 */
.ex-stagebox { padding: 14px 16px; }
.ex-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.ex-seg { appearance: none; position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; font: inherit; color: var(--ink); background: hsl(calc(var(--p) * 1.2) 60% 93%); border: 1px solid hsl(calc(var(--p) * 1.2) 45% 70%); border-radius: 10px; padding: 8px 4px 7px; cursor: pointer; }
.ex-seg b { font: 600 15px var(--latin); }
.ex-seg small { font-size: 11px; color: var(--ink2); font-family: var(--latin); }
.ex-seg em { position: absolute; top: -9px; right: 6px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: #0f172a; border-radius: 999px; padding: 0 7px; }
.ex-seg.on { outline: 3px solid #0f172a; outline-offset: 1px; }
.ex-stage { margin: 12px 0 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; }
.ex-stage span { color: var(--ink2); }
.ex-stagenote { margin: 10px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }
.ex-stagenote .srcl { margin-top: 4px; }

/* 計算してみる */
.ex-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ex-pill { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.ex-pill:hover { border-color: #94a3b8; }
.ex-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ex-calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; align-items: start; }
.ex-form { padding: 14px 16px; margin: 0; }
.ex-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 6px; }
.ex-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink2); min-width: 0; }
.ex-fields input, .ex-fields select { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 9px; padding: 6px 9px; min-width: 0; width: 100%; box-sizing: border-box; }
.ex-fields label.ex-inl { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: var(--ink); grid-column: 1 / -1; }
.ex-inl input { width: 17px; height: 17px; flex: none; accent-color: #0d9488; }
.ex-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 2px; }
.ex-checks label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.ex-checks input { width: 17px; height: 17px; accent-color: #0d9488; }
.ex-meal { display: contents; }
.ex-meal[hidden] { display: none; }
.ex-co { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ex-co summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.ex-out { padding: 14px 16px; position: sticky; top: 12px; display: grid; gap: 10px; }
.ex-oh { margin: 0; font-size: 13px; color: var(--muted); }
.ex-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex-rows li { display: grid; grid-template-columns: 22px 2.4em minmax(0, 1fr); gap: 0 8px; align-items: baseline; font-size: 13px; padding: 5px 8px; border-radius: 8px; background: #f8fafc; }
.ex-rows li b { font-size: 13px; }
.ex-rows li > span:last-child { grid-column: 3; color: var(--ink2); font-size: 12.5px; overflow-wrap: anywhere; }
.ex-rows li.ok { background: #f0fdf4; }
.ex-rows li.ng { background: #fef2f2; }
.ex-mk { font-weight: 700; text-align: center; }
.ex-rows li.ok .ex-mk { color: #15803d; }
.ex-rows li.ng .ex-mk { color: #b91c1c; }
.ex-rows li.na .ex-mk { color: var(--muted); }
.ex-no2 { font: 600 12px var(--sans); color: var(--muted); }
.ex-v { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; background: var(--line2); }
.ex-v small { font-size: 11px; font-weight: 700; color: var(--muted); }
.ex-v b { font-size: 16px; }
.ex-v > span { color: var(--ink2); }
.ex-v .srcl { margin-top: 2px; }
.ex-v.ok { background: #f0fdf4; } .ex-v.ok b { color: #15803d; }
.ex-v.part { background: #fffbeb; } .ex-v.part b { color: #b45309; }
.ex-v.warn { background: #fff7ed; } .ex-v.warn b { color: #c2410c; }
.ex-v.ng { background: #fef2f2; } .ex-v.ng b { color: #b91c1c; }
.ex-onote { margin: 0; font-size: 12.5px; color: var(--ink2); background: #eff6ff; border-radius: 8px; padding: 7px 11px; }
.ex-onote b { display: block; font-size: 12.5px; color: var(--ink); }
.ex-onote .srcl { margin-top: 3px; }

/* データの形 */
.ex-sm { padding: 14px 16px; }
.ex-states { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ex-state { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.ex-state:hover { border-color: #94a3b8; }
.ex-state.on { background: #0d9488; border-color: #0d9488; color: #fff; }
.ex-arrow { color: #94a3b8; font-size: 13px; }
.ex-stated { margin-top: 12px; }
.ex-stated h3 { margin: 4px 0 4px; font-size: 16px; color: var(--ink); }
.ex-stated p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.ex-next { margin-top: 8px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ex-next span { font-size: 12px; font-weight: 700; color: var(--muted); }
.ex-next button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; color: #0f766e; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.ex-next em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.ex-tbl dl { margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; font-size: 12.5px; }
.ex-tbl dt { font-family: var(--latin); font-weight: 600; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.ex-tbl dd { margin: 0; color: var(--ink2); }

/* チェックリスト */
.cklist { padding: 10px 16px; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.mlist label { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; padding: 5px 0; }
.mlist input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #0d9488; cursor: pointer; }
.mlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.ckfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ckcount { font-family: var(--latin); font-size: 13px; color: var(--muted); }
.ckreset { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }

.ex-seg2 button:focus-visible, .ex-step:focus-visible, .ex-nav button:focus-visible, button.ex-ln:focus-visible, .ex-seg:focus-visible, .ex-pill:focus-visible, .ex-fields input:focus-visible, .ex-fields select:focus-visible, .ex-checks input:focus-visible, .ex-co summary:focus-visible, .ex-state:focus-visible, .ex-next button:focus-visible, .ex-go a:focus-visible, .srcl a:focus-visible, .fhead p a:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .ex-flow, .ex-read, .ex-calc { grid-template-columns: minmax(0, 1fr); }
  .ex-panel, .ex-out { position: static; }
  .ex-grid, .ex-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ex-grid, .ex-grid.two, .ex-grid.four, .mlist { grid-template-columns: minmax(0, 1fr); }
  .ex-fields { grid-template-columns: minmax(0, 1fr); }
  .ex-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .ex-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ex-dl dd { margin-bottom: 6px; }
  .ex-seg2 { display: flex; }
  .ex-seg2 button { flex: 1 1 auto; }
}
