/* クラウドの費用。style.css・flow.css・fm.css の上に重ねる（接頭辞 cs-。予算の中は緑、超えたら赤、ラベルの無い費用は琥珀） */
.cs-gap { margin-top: 12px; }
.cs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cs-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 6.5em; }
.cs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.cs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 3px 0; }
.cs-note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 6px 10px; }
.cs-note .srcl { display: inline; }
.cs-judge { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.cs-judge.ok { background: #f0fdf4; color: #14532d; }
.cs-judge.ng { background: #fef2f2; color: #7f1d1d; }
.cs-judge.mid { background: #fffbeb; color: #78350f; }
.cs-judge b { font-family: var(--latin); }

/* 何にお金がかかるか */
.cs-unit { display: inline-block; align-self: flex-start; margin: 6px 0 2px !important; font-size: 11.5px !important; font-weight: 700; color: #075985 !important; background: #e0f2fe; border-radius: 6px; padding: 1px 8px; }
.cs-facts { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 13px; color: var(--ink2); }
.cs-facts .srcl { display: block; margin-top: 2px; }

/* 計算 */
.cs-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: start; }
.cs-ctl, .cs-out { padding: 12px 14px; min-width: 0; }
.cs-ctl h3 { margin: 12px 0 4px; font-size: 13px; color: var(--ink); }
.cs-ctl h3:first-child { margin-top: 0; }
.cs-sl { display: grid; grid-template-columns: 10.5em minmax(0, 1fr) 6.2em; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.cs-sl span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cs-sl input { width: 100%; min-width: 0; accent-color: #0d9488; }
.cs-sl output { font: 600 12.5px var(--latin); text-align: right; }
.cs-out h3 { margin: 0 0 4px; font-size: 14px; }
.cs-big { margin: 0; font: 700 30px/1.2 var(--latin); color: #0f766e; }
.cs-sub { margin: 4px 0 8px; font-size: 12.5px; color: var(--ink2); }
.cs-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cs-bars li { display: grid; grid-template-columns: 11em minmax(0, 1fr) 7.5em; align-items: center; gap: 2px 8px; font-size: 12.5px; }
.cs-bars li span { color: var(--ink2); line-height: 1.3; }
.cs-bars li i { display: block; height: 10px; min-width: 2px; border-radius: 999px; background: #99f6e4; }
.cs-bars li b { font: 600 12.5px var(--latin); text-align: right; }
.cs-bars li small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.cs-bars li.big span { font-weight: 700; color: var(--ink); }
.cs-bars li.big i { background: #0d9488; }
.cs-tip { margin: 10px 0 0; font-size: 13px; color: var(--ink2); }
.cs-tip b { display: block; color: var(--ink); }
.cs-price { margin-top: 10px; padding: 10px 14px; }
.cs-price summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #1d4ed8; }
.cs-price table { margin-top: 8px; max-width: 640px; }

/* ラベルの練習 */
.cs-labels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; align-items: start; }
.cs-sumcard { padding: 12px 14px; min-width: 0; position: sticky; top: 12px; }
.cs-sumcard .cs-judge { margin-top: 0; }
.cs-score { margin: 6px 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cs-gt .n { text-align: right; font-family: var(--latin); white-space: nowrap; }
.cs-gt td small, .cs-gt th small { display: block; font: 500 11px var(--sans); color: var(--muted); }
.cs-gt tr.none th, .cs-gt tr.none td { background: #fffbeb; color: #78350f; }
.cs-gt tfoot th, .cs-gt tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
.cs-barcell { width: 30%; }
.cs-barcell i { display: block; height: 9px; min-width: 2px; border-radius: 999px; background: #5eead4; }
.cs-gt tr.none .cs-barcell i { background: #f59e0b; }
.cs-bill { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cs-line { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; min-width: 0; }
.cs-line.unl { border-color: #fcd34d; background: #fffdf5; }
.cs-lh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cs-lh code { font: 600 12.5px var(--latin); overflow-wrap: anywhere; }
.cs-kind { font-size: 11.5px; color: var(--muted); }
.cs-lh b { margin-left: auto; font: 600 13px var(--latin); }
.cs-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cs-tag { font: 600 11.5px var(--latin); background: var(--line2); color: var(--ink2); border-radius: 6px; padding: 1px 7px; }
.cs-tag.bad { background: #fee2e2; color: #991b1b; }
.cs-tag.new { background: #dbeafe; color: #1e3a8a; }
.cs-tag.none { background: #fef3c7; color: #92400e; font-family: var(--sans); }
.cs-clue { margin: 6px 0; font-size: 12.5px; color: var(--ink2); }
.cs-line .pills .pill { font-size: 12px; padding: 4px 10px; }
.cs-fb { margin: 6px 0 0; font-size: 12.5px; border-radius: 8px; padding: 5px 9px; }
.cs-fb.ok { background: #f0fdf4; color: #14532d; }
.cs-fb.ng { background: #fef2f2; color: #7f1d1d; }
.cs-warn { margin: 6px 0 0; font-size: 12.5px; color: #7f1d1d; background: #fef2f2; border-radius: 8px; padding: 5px 9px; }
.cs-warn .srcl { display: block; margin-top: 2px; }

/* 予算の練習 */
.cs-budget { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 10px; align-items: start; }
.cs-rules, .cs-chartbox { padding: 12px 14px; min-width: 0; }
.cs-rules h3, .cs-chartbox h3 { margin: 0 0 8px; font-size: 14px; }
.cs-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--ink2); }
.cs-rule label { display: inline-flex; align-items: center; gap: 5px; }
.cs-on { font-weight: 700; color: var(--ink); min-width: 5.5em; cursor: pointer; }
.cs-on input { width: 16px; height: 16px; accent-color: #0d9488; }
.cs-num input { width: 4.6em; font: 600 13px var(--latin); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; background: var(--paper); color: var(--ink); }
.cs-kindsel select { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; background: var(--paper); color: var(--ink); }
.cs-rules .cs-bar { margin: 10px 0 6px; }
.cs-svg { display: block; width: 100%; height: auto; }
.cs-svg .g { stroke: var(--line2); stroke-width: 1; }
.cs-svg .yl { font: 500 11px var(--latin); fill: var(--muted); text-anchor: end; }
.cs-svg .xl { font: 500 11px var(--latin); fill: var(--muted); text-anchor: middle; }
.cs-svg .bud { stroke: #dc2626; stroke-width: 1.5; stroke-dasharray: 6 4; }
.cs-svg .budl { font: 700 11px var(--sans); fill: #b91c1c; text-anchor: start; }
.cs-svg .none { fill: none; stroke: #94a3b8; stroke-width: 2.5; }
.cs-svg .act { fill: none; stroke: #0f766e; stroke-width: 3; }
.cs-svg .fc { fill: none; stroke: #a78bfa; stroke-width: 1.5; stroke-dasharray: 3 3; }
.cs-svg .m { stroke: #f59e0b; stroke-width: 1.5; }
.cs-svg .ml { font: 700 12px var(--sans); fill: #b45309; text-anchor: middle; }
.cs-key { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.cs-key span { display: inline-flex; align-items: center; gap: 5px; }
.cs-key i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.cs-key .k-none { background: #94a3b8; }
.cs-key .k-act { background: #0f766e; }
.cs-key .k-fc { background: repeating-linear-gradient(90deg, #a78bfa 0 3px, transparent 3px 6px); }
.cs-key .k-bud { background: repeating-linear-gradient(90deg, #dc2626 0 5px, transparent 5px 8px); }
.cs-key .k-m { width: 3px; height: 12px; background: #f59e0b; }
.cs-budout { margin-top: 10px; padding: 12px 14px; }
.cs-rt tr.off td, .cs-rt tr.off th { color: #94a3b8; }
.cs-rt thead th:first-child, .cs-rt thead th:nth-child(3), .cs-rt td:nth-child(3) { white-space: nowrap; }
.cs-dl { margin: 10px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 13px; }
.cs-dl dt { font-weight: 700; color: var(--muted); font-size: 12px; padding-top: 1px; }
.cs-dl dd { margin: 0; }

/* 減らす手・FinOps・データ */
.cs-reduce { min-width: 820px; }
.cs-reduce th[scope="row"] { white-space: nowrap; }
.cs-reduce td .srcl { display: block; margin-top: 4px; }
.cs-prin { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-prin li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.cs-prin b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cs-prin b span { font: 600 11px var(--latin); background: #ccfbf1; color: #115e59; border-radius: 6px; padding: 1px 7px; }
.cs-prin p { margin: 5px 0 0; font-size: 12.5px; color: var(--ink2); }
.cs-phase { margin-top: 10px; padding: 12px 14px; }
.cs-phase h3 { margin: 0 0 6px; font-size: 15px; }
.cs-phase > p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink2); }
.cs-aoba { margin: 8px 0 0 !important; background: #f0fdfa; border-radius: 8px; padding: 7px 10px; color: #134e4a !important; }
.cs-aoba b { display: block; font-size: 12px; margin-bottom: 2px; }
.cs-export th[scope="row"], .cs-lrules th[scope="row"] { white-space: nowrap; }

.cs-sl input:focus-visible, .cs-num input:focus-visible, .cs-kindsel select:focus-visible, .cs-on input:focus-visible, .cs-price summary:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .cs-calc, .cs-labels, .cs-budget { grid-template-columns: minmax(0, 1fr); }
  .cs-sumcard { position: static; }
  .cs-prin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cs-prin { grid-template-columns: minmax(0, 1fr); }
  .cs-sl { grid-template-columns: minmax(0, 1fr) 6.5em; }
  .cs-sl input { grid-column: 1 / -1; grid-row: 2; }
  .cs-bars li { grid-template-columns: 7.5em minmax(0, 1fr) 6.8em; }
  .cs-big { font-size: 26px; }
  .cs-lab { min-width: 0; width: 100%; }
  .cs-barcell { width: 22%; }
}
