:root {
  color-scheme: light;
  --charcoal: #303236;
  --ink: #17191d;
  --muted: #626870;
  --line: #e1e5eb;
  --canvas: #f8f9fc;
  --red: #e30613;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 16px/1.52 Arial, Helvetica, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.brand-strip { height: 4px; background: #343434; }
.topbar { background: #fff; border-bottom: 1px solid #edf0f4; }
.topbar-inner { max-width: 1450px; min-height: 96px; margin: auto; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: flex; align-items: center; min-width: 175px; }
.wordmark img { display: block; width: 175px; height: 30px; }
.topbar-label { color: #4b4e53; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-align: right; }

.page-grid { max-width: 1450px; margin: 0 auto; padding: 42px 32px 92px; display: grid; grid-template-columns: minmax(0, 1fr) 366px; align-items: start; gap: 32px; }
.content { min-width: 0; }
.intro { padding: 4px 0 25px; }
.eyebrow, .section-kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .09em; }
h1, h2, .card-head h4 { font-family: Arial, Helvetica, sans-serif; }
h1 { margin: 7px 0 8px; font-size: clamp(2.1rem, 3vw, 2.85rem); font-weight: 400; line-height: 1.18; letter-spacing: -.025em; }
.intro p { max-width: 810px; margin: 0; color: var(--muted); font-size: 16px; }
.section-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 21px; }
.section-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 14px; border: 1px solid #dce1e7; border-radius: 5px; color: #303236; text-decoration: none; background: #fff; font-size: 14px; font-weight: 700; }
.section-nav a:hover { border-color: var(--red); color: var(--red); background: #fff8f8; }

.estimate-section { padding-top: 22px; margin-top: 6px; scroll-margin-top: 20px; }
.estimate-section + .estimate-section { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 35px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-left: 16px; border-left: 4px solid var(--red); }
.section-heading h2 { margin: 2px 0 0; font-size: 27px; line-height: 1.2; letter-spacing: -.018em; }
.section-count { white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 700; }
.section-lead { max-width: 850px; margin: 10px 0 20px; color: var(--muted); font-size: 15px; }
.domain-group { margin-bottom: 26px; }
.domain-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 0 10px; border-bottom: 1px solid #d9dee6; margin-bottom: 12px; }
.domain-heading h3 { margin: 0; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; }
.domain-heading span { color: #777; font-size: 12px; white-space: nowrap; }
.card-list { display: grid; gap: 10px; }
.function-card { min-width: 0; padding: 20px 22px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 28px rgba(34, 43, 60, .045); }
.function-card.mvp { border-color: #d9dde3; background: #f0f2f5; box-shadow: none; }
.function-card.mvp details { border-color: #d5d9df; }
.function-card.option.is-selected { border-color: #ef9299; box-shadow: inset 4px 0 var(--red), 0 12px 28px rgba(34, 43, 60, .045); }
.function-card.option.is-unselected { border-color: var(--line); }
.function-card.backlog { border-color: #e5e7ea; background: #fcfcfd; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.card-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-checkbox { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--red); cursor: pointer; }
.task-checkbox:disabled { accent-color: #8e8e8e; cursor: default; opacity: .9; }
.backlog-icon { margin-top: 2px; display: grid; place-items: center; width: 23px; height: 23px; flex: none; border-radius: 4px; color: #666; background: #ebebeb; font-size: 16px; font-weight: 800; }
.card-head h4 { margin: 0; font-size: 18px; line-height: 1.3; }
.card-head h4 label { cursor: pointer; }
.card-price { flex: none; display: grid; justify-items: end; gap: 2px; padding-top: 3px; text-align: right; }
.card-price strong { font-size: 16px; line-height: 1.25; white-space: nowrap; }
.card-price span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.backlog-status { color: #555; background: #f0f1f3; border-radius: 5px; font-size: 12px; font-weight: 800; padding: 5px 8px; white-space: nowrap; }
.card-description { margin: 14px 0 17px 32px; color: #555; font-size: 15px; }
.function-card details { margin-left: 32px; border-top: 1px solid var(--line); }
.function-card details summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 0 16px; cursor: pointer; color: #333; font-size: 14px; font-weight: 700; }
.function-card details summary::-webkit-details-marker { display: none; }
.function-card details summary::before { content: ""; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 6px solid currentColor; transform-origin: 3px center; transition: transform .15s; }
.function-card details[open] summary::before { transform: rotate(90deg); }
.detail-count { color: #888; font-size: 12px; font-weight: 400; }
.details-inner { padding-bottom: 20px; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-row { padding: 12px 0; border-top: 1px solid #e8e8e8; }
.work-row:first-child { border-top: 0; }
.work-main { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.work-name { font-size: 14px; font-weight: 700; }
.work-amount { white-space: nowrap; font-size: 14px; font-weight: 800; }
.work-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.work-note { margin: 5px 0 0; color: #666; font-size: 13px; }
.assumption { margin: 13px 0 0; padding: 13px 15px; color: #555; background: #f5f6f8; border-left: 3px solid var(--red); border-radius: 0 7px 7px 0; font-size: 14px; }
.assumption strong { color: #333; }
.work-list-backlog { list-style: disc; padding-left: 18px; }
.backlog-work { padding: 4px 0; color: #444; font-size: 14px; }

.summary { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; border: 1px solid #e3e7ed; border-top: 5px solid var(--red); border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(34,43,60,.08); }
.summary-dark { padding: 24px 25px 26px; color: #fff; background: var(--charcoal); }
.summary-kicker, .summary-subtitle { margin: 0; color: #d0d0d0; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.summary-title { margin-top: 9px; font-size: 16px; font-weight: 700; }
.summary-total {margin: 20px 0 5px;min-height: 42px;font-size: clamp(1.45rem, 2vw, 1.83rem);line-height: 1.15;font-weight: 900;letter-spacing: -.035em;overflow-wrap: anywhere;}
.summary-caption { margin: 0; color: #d5d5d5; font-size: 13px; }
.summary-rows { display: grid; gap: 9px; margin-top: 27px; }
.summary-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.summary-rows span { color: #d5d5d5; }
.summary-rows strong { text-align: right; white-space: nowrap; }
.summary-separator { height: 1px; background: #6b6e73; margin: 25px 0 20px; }
.summary-hours { margin: 8px 0 6px; font-size: 24px; font-weight: 900; }
.summary-duration { margin: 16px 0 0; color: #ededed; font-size: 14px; }
.summary-duration strong { color: #fff; }
.summary-explanation { padding: 20px 25px; background: #f3f5f8; font-size: 13px; }
.summary-explanation strong { font-size: 14px; }
.summary-explanation p { margin: 8px 0 13px; color: #555; }
.rate-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #d1d1d1; }
.rate-list li { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; color: #555; }
.rate-list strong { font-size: 13px; color: #333; white-space: nowrap; }
.summary-actions { display: grid; gap: 9px; padding: 20px 24px 24px; }
.button { min-height: 46px; padding: 10px 15px; border-radius: 5px; font-size: 15px; font-weight: 800; text-align: center; }
.button-primary { border: 1px solid var(--red); background: var(--red); color: #fff; }
.button-primary:hover { background: #bd0712; }
.button-outline { border: 1px solid #bdbdbd; background: #fff; color: #333; }
.button-outline:hover { border-color: var(--red); color: var(--red); background: #fff8f8; }
.share-result { display: grid; gap: 6px; margin-top: 4px; }
.share-result[hidden] { display: none; }
.share-result label { color: #414750; font-size: 14px; font-weight: 700; }
.share-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.share-link-row input { min-width: 0; padding: 10px; border: 1px solid #bdc5ce; border-radius: 5px; background: #fff; color: #303236; font-size: 14px; }
.share-link-row .button { min-height: 43px; padding: 8px 10px; font-size: 14px; }
.share-feedback { min-height: 0; margin: 0; color: #505862; font-size: 14px; line-height: 1.4; }
.share-feedback:empty { display: none; }

@media (max-width: 1120px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; padding-inline: 22px; }
  .summary-dark, .summary-explanation { padding-inline: 19px; }
  .summary-actions { padding-inline: 18px; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .card-price { justify-items: start; margin-left: 32px; text-align: left; }
}
@media (max-width: 830px) {
  .page-grid { display: flex; flex-direction: column; gap: 22px; padding: 24px 18px 70px; }
  .summary { position: static; order: -1; width: 100%; max-height: none; overflow: visible; }
  .content { display: contents; }
  .intro { order: -2; padding-bottom: 0; }
  .estimate-section { width: 100%; }
  .summary-total { font-size: clamp(1.7rem, 4vw, 2.15rem); }
  .topbar-inner { min-height: 70px; padding-inline: 18px; }
  .wordmark { min-width: 145px; }
  .wordmark img { width: 145px; height: auto; }
}
@media (max-width: 550px) {
  body { font-size: 15px; }
  .topbar-label { font-size: 10px; max-width: 120px; }
  .intro p { font-size: 15px; }
  .section-heading h2 { font-size: 24px; }
  .function-card { padding: 16px 14px 0; }
  .card-head h4 { font-size: 16px; }
  .card-price, .card-description, .function-card details { margin-left: 30px; }
  .work-main { display: block; }
  .work-amount { display: block; margin-top: 2px; }
  .section-count { font-size: 12px; }
  .summary-rows > div { font-size: 12px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  html { scroll-behavior: auto; }
  body { background: white; color: #111; font-size: 11pt; }
  .brand-strip { display: none; }
  .topbar-inner { padding: 0 0 9mm; min-height: 0; }
  .topbar-label, .section-nav, .summary-actions, .eyebrow { display: none !important; }
  .page-grid { display: flex; flex-direction: column; padding: 0; gap: 8mm; }
  .content { display: contents; }
  .intro { order: -2; padding: 0; }
  .intro h1 { font-size: 22pt; margin: 0 0 3mm; }
  .intro p { font-size: 10pt; }
  .summary { order: -1; position: static; width: 100%; max-height: none; overflow: visible; border: 1px solid #888; break-inside: avoid; }
  .summary-dark { color: #111; background: #f0f3f7; padding: 5mm; }
  .summary-kicker, .summary-subtitle, .summary-caption, .summary-rows span { color: #333; }
  .summary-duration, .summary-duration strong { color: #333; }
  .summary-title { display: none; }
  .summary-total { font-size: 18pt; min-height: 0; margin: 3mm 0 1mm; }
  .summary-rows, .summary-separator { margin-top: 3mm; }
  .summary-explanation { padding: 3mm 5mm; background: #fff; }
  .summary-explanation p { display: none; }
  .rate-list { display: flex; gap: 8mm; border: 0; }
  .rate-list li { gap: 2mm; }
  .estimate-section { padding: 0; margin: 0; }
  .estimate-section + .estimate-section { margin: 4mm 0 0; padding: 4mm 0 0; }
  .section-lead { margin: 2mm 0 4mm; }
  .domain-group { margin: 0 0 5mm; }
  .domain-heading { margin-bottom: 2mm; }
  .card-list { gap: 3mm; }
  .function-card { padding: 3mm 4mm 0; box-shadow: none; border-color: #aaa; break-inside: avoid; }
  .function-card.option.is-unselected, #option-items .domain-group:not(.has-selection) { display: none !important; }
  .function-card details { border-color: #bbb; }
  .function-card details summary { padding: 2mm 0; }
  .details-inner { padding-bottom: 2mm; }
  .work-row { padding: 2mm 0; }
  .assumption { background: #f2f2f2; }
}

/* print-cleanup-2026-09-25 */
@media print {
  .summary { border: 0; border-radius: 0; box-shadow: none; }
  .function-card, .function-card.mvp,
  .function-card.option.is-selected, .function-card.backlog {
    padding: 3mm 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .task-checkbox, .backlog-icon { display: none !important; }
  .card-price, .card-description, .function-card details { margin-left: 0; }
}
