/* 실무 포털: 공통 디자인 토큰은 style.css의 :root를 사용합니다. */
.portal-section { background: #f5f6f9; border-top: 1px solid var(--line); }
.portal-section button, .portal-section input, .portal-section select,
.portal-section dd, .portal-section time, .tool-count { font-variant-numeric: tabular-nums; }
.portal-section h4 { margin: 0; letter-spacing: -.035em; line-height: 1.5; }
.portal-main-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid #d8dfea;
  border-radius: 7px;
  background: #e9edf4;
}
.portal-main-tabs button {
  min-height: 56px;
  padding: 12px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #53617b;
  font-size: 15px;
  line-height: 1.6;
}
.portal-main-tabs button:hover { background: #ffffff90; }
.portal-main-tabs button[aria-selected=true] { background: var(--navy); color: white; border-color: var(--navy); font-weight: 600; box-shadow: 0 2px 8px #1c2c5715; }
.portal-main-tabs button:focus-visible { outline-offset: -3px; }
.service-card .service-tools {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
  margin-top: auto;
  padding-top: 25px;
}
.service-tools a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 9px 10px;
  min-height: 44px;
  border: 1px solid #d4dcea;
  border-radius: 3px;
  color: var(--navy);
  background: #f8f9fc;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}
.service-tools a:hover { border-color: #7486aa; background: #edf1f8; }
.service-card.featured .service-tools { margin: auto 0 0; padding-top: 25px; border-top: 1px solid #516080; }
.featured .service-tools a { color: white; border-color: #72809e; background: transparent; }
.featured .service-tools a:first-child { color: var(--navy); background: white; border-color: white; }
.featured .service-tools a:hover { background: #e8edf6; color: var(--navy); }
.primary-nav { gap: 20px; }
.portal-block { margin-top: 30px; scroll-margin-top: 112px; }
.portal-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 23px; }
.portal-heading .eyebrow { font-size: 13px; margin-bottom: 6px; }
.portal-heading h3 { font-size: 28px; color: var(--navy); }
.section-badge { font-size: 12px; color: #657189; text-align: right; }
.portal-shell { border: 1px solid #d8dfea; background: white; border-radius: 8px; box-shadow: 0 5px 24px #15274a05; overflow: hidden; }
.portal-tabs { display: flex; background: #edf0f5; padding: 6px; gap: 4px; border-bottom: 1px solid #dce2ec; }
.portal-tabs button { min-width: 0; flex: 1; border: 1px solid transparent; border-radius: 5px; padding: 13px 9px; font-size: 14px; line-height: 1.5; color: #5d667b; background: transparent; min-height: 46px; }
.portal-tabs button:hover { background: #ffffff80; }
.portal-tabs button[aria-selected=true] { color: var(--navy); font-weight: 600; background: white; border-color: #d3dbe9; box-shadow: 0 2px 6px #1c2c5708; }
.portal-tabs button:focus-visible { outline-offset: -3px; }
.portal-panel { padding: 32px; }
.portal-panel:focus-visible { outline-offset: -4px; }
.tool-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.tool-intro h3 { color: var(--navy); font-size: 23px; }
.tool-intro p { font-size: 14px; margin-top: 7px; }
.tool-count { font-size: 13px; color: var(--navy); white-space: nowrap; border: 1px solid #dbe1ed; border-radius: 30px; padding: 6px 12px; background: #f8f9fc; }
.diagnosis-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: start; }
.diagnosis-question { margin: 0 0 23px; border: 0; padding: 0; min-width: 0; }
.diagnosis-question legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 500; line-height: 1.65; }
.diagnosis-question legend>span { color: #8a96ac; font-size: 12px; margin-right: 9px; }
.choice-group { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-button { border: 1px solid #d8deea; border-radius: 5px; padding: 10px 16px; min-height: 44px; background: white; color: #4c586f; font-size: 14px; transition: background .15s, border-color .15s; }
.choice-button:hover { border-color: #7c8daf; background: #f6f8fc; }
.choice-button[aria-pressed=true] { background: var(--navy); color: white; border-color: var(--navy); box-shadow: 0 2px 6px #1c2c571a; }
.reset-link { border: 0; background: transparent; color: #67738b; font-size: 13px; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; padding: 8px; }
.diagnosis-feedback { position: sticky; top: 112px; }
.result-placeholder { border: 1px dashed #cbd4e4; border-radius: 6px; background: #f8f9fc; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.result-placeholder .icon { width: 30px; height: 30px; margin-bottom: 20px; color: #8291af; }
.result-placeholder h4 { font-size: 18px; color: var(--navy); font-weight: 500; }
.result-placeholder p { font-size: 14px; margin-top: 12px; line-height: 1.8; }
.result-placeholder>span { font-size: 12px; color: #7b869b; margin-top: 25px; }
.diagnosis-result { border-radius: 7px; background: var(--navy); color: white; padding: 28px; box-shadow: 0 7px 22px #1c2c5710; }
.result-eyebrow { display: inline-flex; border: 1px solid #8190b266; color: #d5deef; font-size: 12px; padding: 4px 10px; border-radius: 30px; }
.diagnosis-result h4 { font-size: 24px; margin-top: 16px; font-weight: 500; line-height: 1.55; }
.diagnosis-threshold { color: #d2dbed; padding: 18px 0; margin-top: 12px; border-bottom: 1px solid #7082a54d; font-size: 14px; }
.diagnosis-threshold strong { display: block; color: white; font-size: 32px; margin-top: 3px; }
.diagnosis-result ul { padding-left: 18px; margin: 20px 0; }
.diagnosis-result li { color: #d1daec; font-size: 13px; line-height: 1.85; margin-top: 12px; }
.diagnosis-result .button { width: 100%; background: white; color: var(--navy); font-size: 14px; border-color: white; }
.diagnosis-result .result-footnote { font-size: 11px; color: #b9c5dd; margin-top: 14px; }
.calculator-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: start; }
.calc-field { margin-bottom: 20px; }
.calc-field label { display: block; font-size: 14px; color: #3f4a61; font-weight: 500; margin-bottom: 8px; }
.calc-field input, .calc-field select { font-size: 16px; min-height: 50px; border-color: #ccd5e5; border-radius: 5px; }
.calc-field input:focus, .calc-field select:focus { box-shadow: 0 0 0 3px #1c2c5709; }
.money-input { position: relative; }
.money-input input { padding-right: 40px; text-align: right; font-size: 18px; }
.money-input>span { position: absolute; top: 12px; right: 15px; color: #7f899d; font-size: 14px; }
.calculator-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.calculator-actions .button { flex: 1; min-height: 48px; font-size: 14px; }
.calculation-assumption { padding: 15px 0 0; margin-top: 18px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.9; }
.source-links { display: flex; gap: 6px 13px; flex-wrap: wrap; margin-top: 12px; }
.source-links a { font-size: 12px; color: #63728e; text-decoration: underline; text-underline-offset: 3px; }
.calculation-result { border: 1px solid #d7dfec; border-radius: 6px; overflow: hidden; }
.calculation-result .result-placeholder { border: 0; border-radius: 0; min-height: 300px; }
.result-summary { background: var(--navy); color: white; padding: 25px 26px; }
.result-summary>span { font-size: 13px; color: #d1dbed; }
.result-summary strong { font-size: clamp(25px,2.6vw,35px); font-weight: 600; display: block; letter-spacing: -.04em; line-height: 1.4; margin-top: 8px; overflow-wrap: anywhere; }
.result-breakdown { padding: 6px 23px; margin: 0; }
.result-metric { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid #e6eaf1; }
.result-metric:last-child { border: 0; }
.result-metric dt { font-size: 12px; color: #65728a; }
.result-metric dd { margin: 0; text-align: right; font-size: 15px; font-weight: 500; color: var(--navy); overflow-wrap: anywhere; }
.result-metric.is-total { font-weight: 600; }
.result-explanation { font-size: 12px; line-height: 1.9; padding: 17px 23px; background: #f5f7fb; border-top: 1px solid #e1e6ef; }
.calculation-disclaimer { font-size: 12px; line-height: 1.8; margin-top: 13px; color: #6d7890; }
.calendar-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.calendar-card, .deadline-board { background: white; border: 1px solid #d8dfea; box-shadow: 0 5px 24px #15274a05; border-radius: 8px; padding: 27px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.calendar-toolbar h4 { font-size: 23px; color: var(--navy); }
.calendar-toolbar>div { display: flex; gap: 7px; }
.calendar-toolbar button { background: white; border: 1px solid #d8deea; color: #586680; border-radius: 5px; min-height: 42px; min-width: 42px; font-size: 23px; line-height: 1; }
.calendar-toolbar #calendar-today { font-size: 13px; padding: 8px 13px; }
.calendar-toolbar button:hover { background: #edf1f7; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.calendar-weekdays { text-align: center; font-size: 12px; color: #8590a5; margin-bottom: 10px; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 55px; border: 1px solid transparent; background: #f7f8fb; border-radius: 5px; color: #34425f; font-size: 15px; padding: 5px 0; }
.calendar-day:hover { background: #e9eef7; }
.calendar-day.is-holiday { color: #98616c; }
.calendar-day.is-today { border-color: #7184a9; }
.calendar-day.is-selected { background: var(--navy); color: white; }
.calendar-dots { min-height: 8px; display: flex; gap: 3px; margin-top: 4px; }
.calendar-dots i, .calendar-legend i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--navy); border: 1px solid var(--navy); }
.calendar-dots i.hollow, .calendar-legend i.hollow { background: transparent; }
.is-selected .calendar-dots i { background: white; border-color: white; }
.is-selected .calendar-dots i.hollow { background: transparent; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 13px; font-size: 11px; color: #778198; margin: 17px 0; }
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
.selected-date-panel { border-top: 1px solid var(--line); padding-top: 20px; }
.selected-date-panel h4 { font-size: 14px; color: var(--navy); margin-bottom: 12px; }
.selected-event { padding: 11px 13px; background: #f0f3f9; border-left: 2px solid var(--navy); border-radius: 3px; margin-bottom: 8px; }
.selected-event strong { font-size: 14px; color: var(--navy); }
.selected-event p, .selected-event span { font-size: 12px; line-height: 1.8; display: block; color: #69758c; }
.calendar-empty { font-size: 13px; line-height: 1.9; color: #788399; min-height: 55px; }
.board-heading h4 { font-size: 22px; color: var(--navy); margin-top: 12px; }
.board-heading p { font-size: 13px; margin: 7px 0 20px; }
.upcoming-event { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; gap: 12px; background: white; border: 0; border-top: 1px solid #e6eaf1; padding: 14px 3px; }
.upcoming-event.is-active, .upcoming-event:hover { background: #f1f4fa; }
.upcoming-event strong { color: #33425f; font-size: 14px; font-weight: 500; display: block; }
.upcoming-event small { color: #7b869b; display: block; margin-top: 3px; font-size: 12px; }
.dday-badge { border: 1px solid #dce3ee; background: #f0f3f9; color: var(--navy); padding: 4px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.annual-schedule { border-top: 1px solid #dfe5ee; margin-top: 12px; padding-top: 19px; }
.annual-schedule summary { font-size: 14px; color: var(--navy); display: flex; justify-content: space-between; }
.annual-schedule summary::after { content: '+'; }
.annual-schedule[open] summary::after { content: '−'; }
.annual-schedule ul { list-style: none; padding: 0; margin: 15px 0 0; }
.annual-schedule li { display: flex; gap: 20px; font-size: 12px; padding: 6px 0; color: #68758c; }
.annual-schedule strong { width: 80px; flex-shrink: 0; font-weight: 500; color: #425170; }
.calendar-notice { font-size: 12px; color: #6b7790; margin-top: 15px; }
.calendar-notice+.calendar-notice { margin-top: 5px; }
.calendar-notice a { text-decoration: underline; text-underline-offset: 3px; }
.checklist-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
.checklist-columns h4 { display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: var(--navy); border-bottom: 1px solid #cfd8e8; padding-bottom: 13px; }
.checklist-columns h4 span { font-size: 12px; color: #8894a9; font-weight: 400; }
.checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 9px; border-bottom: 1px solid #edf0f5; border-radius: 3px; cursor: pointer; font-size: 14px; color: #525e75; line-height: 1.7; }
.checklist-item:hover, .checklist-item:has(input:checked) { background: #f3f6fb; }
.checklist-item:has(input:checked) { color: var(--navy); }
.checklist-item input { appearance: auto; width: 18px; height: 18px; accent-color: var(--navy); margin: 3px 0 0; flex-shrink: 0; }
.checklist-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.checklist-actions>span { font-size: 12px; color: #506784; }
.document-note { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.9; color: #738098; }
.copy-fallback { margin-top: 20px; }
.copy-fallback label { display: block; font-size: 13px; color: var(--navy); margin-bottom: 8px; }
.copy-fallback textarea { font-size: 14px; }
.portal-source-details { margin-top: 30px; border-top: 1px solid #dbe1eb; padding-top: 22px; }
.portal-source-details summary { font-size: 13px; color: #6b7890; }
.portal-source-details summary::after { content: ' +'; }
.portal-source-details[open] summary::after { content: ' −'; }
.portal-source-details p { font-size: 12px; margin-top: 13px; }
.portal-notice { background: white; padding: 20px; margin-top: 20px; font-size: 14px; }
@media (max-width: 1100px) {
  .portal-panel { padding: 25px; }
  .diagnosis-layout, .calculator-layout { gap: 25px; }
  .choice-button { padding-inline: 12px; }
  .calendar-layout { gap: 18px; }
  .calendar-card, .deadline-board { padding: 21px; }
  .portal-tabs button { font-size: 13px; }
}
@media (max-width: 760px) {
  .portal-main-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-main-tabs button { font-size: 13px; min-height: 52px; padding-inline: 7px; }
  .service-tools a { font-size: 12px; padding-inline: 6px; }
  .portal-block { margin-top: 24px; scroll-margin-top: 90px; }
  .portal-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 18px; }
  .portal-heading h3 { font-size: 25px; }
  .section-badge { text-align: left; }
  .portal-tabs { flex-wrap: wrap; gap: 4px; padding: 6px; }
  .portal-tabs button { flex: 1 1 calc(33.333% - 8px); font-size: 12px; padding: 10px 5px; min-height: 44px; }
  #diagnosis-content .portal-tabs button { flex-basis: calc(50% - 8px); }
  .portal-panel { padding: 23px 19px; }
  .tool-intro { gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
  .tool-intro h3 { font-size: 21px; }
  .tool-intro p { font-size: 13px; }
  .tool-count { font-size: 12px; padding: 4px 11px; }
  .diagnosis-layout, .calculator-layout, .calendar-layout, .checklist-columns { grid-template-columns: minmax(0,1fr); gap: 25px; }
  .diagnosis-feedback { position: static; }
  .diagnosis-question legend { font-size: 14px; }
  .choice-button { font-size: 13px; min-height: 44px; padding: 10px 13px; }
  .diagnosis-result { padding: 23px; }
  .diagnosis-result h4 { font-size: 22px; }
  .diagnosis-result li { font-size: 13px; }
  .result-placeholder { min-height: 210px; padding: 23px 14px; }
  .result-placeholder h4 { font-size: 17px; }
  .result-summary strong { font-size: 29px; }
  .result-summary { padding: 22px; }
  .result-breakdown { padding-inline: 18px; }
  .result-metric dd { font-size: 14px; }
  .calendar-card, .deadline-board { padding: 19px; }
  .calendar-toolbar h4 { font-size: 21px; }
  .calendar-toolbar button { min-width: 37px; min-height: 42px; }
  .calendar-weekdays, .calendar-days { gap: 3px; }
  .calendar-day { min-height: 48px; font-size: 14px; }
  .calendar-legend { font-size: 10px; gap: 8px; }
  .checklist-item { padding: 14px 5px; font-size: 14px; }
  .checklist-actions { gap: 6px; }
  .checklist-actions .button { padding-inline: 12px; font-size: 13px; min-height: 44px; }
}
@media (max-width: 370px) {
  .portal-panel { padding: 20px 14px; }
  .choice-button { padding-inline: 10px; font-size: 12px; }
  .calendar-card { padding: 14px 10px; }
  .calendar-toolbar { gap: 7px; }
  .calendar-toolbar h4 { font-size: 19px; }
  .calendar-day { min-height: 44px; }
  .result-summary strong { font-size: 25px; }
  .result-metric { flex-wrap: wrap; gap: 4px; }
  .result-metric dd { margin-left: auto; }
}
@media print {
  .portal-main-tabs, .portal-tabs, .calculator-actions, .checklist-actions { display: none; }
  .portal-section { background: white; }
  .portal-block { margin-top: 25px; }
  .diagnosis-feedback { position: static; }
}

/* 7개 헤더 메뉴는 태블릿에서도 접이식 메뉴로 제공합니다. */
@media (min-width: 761px) and (max-width: 1000px) {
  .header-inner { min-height: 80px; }
  .menu-toggle { display: flex; margin-left: auto; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; }
  .menu-toggle>span:not(.sr-only) { width: 23px; height: 1.5px; background: var(--navy); transition: transform .2s; }
  .menu-toggle[aria-expanded=true]>span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded=true]>span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 13px 30px 24px; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 14px 18px #1c2c570a; max-height: calc(100dvh - 80px); overflow-y: auto; }
  .primary-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav>a:not(.button) { font-size: 16px; padding: 12px 0; border-bottom: 1px solid #eef0f5; }
  .primary-nav .button { margin-top: 18px; min-height: 47px; font-size: 15px; }
}
@media (max-width: 760px) { .primary-nav { gap: 0; } }
