:root {
  --navy-950: #091747;
  --navy-900: #0e2268;
  --navy-800: #142d85;
  --navy-700: #2343a3;
  --teal-700: #142d85;
  --teal-600: #2343a3;
  --teal-100: #dce5ff;
  --teal-50: #f2f5ff;
  --amber-500: #e8a83e;
  --amber-100: #fef3c7;
  --red-600: #dc2626;
  --red-50: #fef2f2;
  --ink: #17212b;
  --muted: #66788a;
  --line: #d9e2ec;
  --line-strong: #bcccdc;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --page: #edf3f7;
  --shadow: 0 18px 45px rgba(16, 42, 67, 0.1);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font:
    Pretendard, "Pretendard Variable", "Noto Sans KR", "Malgun Gothic",
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 45, 133, 0.09), transparent 28%),
    var(--page);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
select,
label[for] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.upload-zone:focus-within {
  outline: 3px solid rgba(35, 67, 163, 0.24);
  outline-offset: 2px;
}

body.locked {
  overflow: hidden;
}

.lock-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.97), rgba(23, 63, 95, 0.94)),
    var(--navy-950);
}

.lock-panel {
  width: min(440px, 100%);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  color: var(--navy-950);
  background: linear-gradient(145deg, #f8cf78, var(--amber-500));
  box-shadow: 0 10px 25px rgba(232, 168, 62, 0.25);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 800;
}

.brand-mark.small {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 13px;
  font-size: 24px;
}

.brand-mark.brand-logo {
  width: 112px;
  height: 42px;
  margin: 0;
  border-radius: 12px;
  padding: 6px 8px;
  background: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.brand-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.lock-panel .eyebrow {
  color: #d1d9ff;
}

.lock-panel h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 38px);
  letter-spacing: -0.04em;
}

.lock-copy {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.72);
}

.unlock-form label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-row input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.password-row input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.password-row button {
  border: 0;
  border-radius: 11px;
  padding: 0 18px;
  color: var(--navy-950);
  background: #f4c968;
  font-weight: 800;
}

.form-error {
  min-height: 21px;
  margin: 8px 0 0;
  color: #fecaca;
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
  opacity: 1;
  transition: opacity 180ms ease;
}

body.locked .app-shell {
  visibility: hidden;
  opacity: 0;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  color: white;
  background: rgba(20, 45, 133, 0.98);
  box-shadow: 0 8px 28px rgba(11, 31, 51, 0.15);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: min(1480px, calc(100% - 40px));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.brand,
.header-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.brand .eyebrow {
  color: #c4d0ff;
}

.header-actions {
  gap: 10px;
}

.status-pill,
.count-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.neutral {
  color: #c8d7e5;
  background: rgba(255, 255, 255, 0.08);
}

.status-pill.ok {
  color: #dce5ff;
  background: rgba(35, 67, 163, 0.2);
}

.status-pill.warn {
  color: #fde68a;
  background: rgba(232, 168, 62, 0.18);
}

.main {
  width: min(1480px, calc(100% - 40px));
  margin: 28px auto 54px;
}

.control-card,
.result-card {
  border: 1px solid rgba(188, 204, 220, 0.88);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.control-card {
  padding: 26px;
}

.result-card {
  margin-top: 20px;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 3px 0 0;
  color: var(--navy-900);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.035em;
}

.setup-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.version-check-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.version-check-status {
  display: inline-flex;
  min-width: 142px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.version-check-status.neutral {
  color: #607286;
  background: #e9f0f5;
}

.version-check-status.latest {
  color: #142d85;
  background: #e4eaff;
}

.version-check-status.update {
  color: #9a5b00;
  background: #fff1c2;
}

.version-check-status.error {
  color: #7c5b21;
  background: #f5eee1;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.step-label {
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.setup-step-label {
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.035em;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
}

.upload-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.embedded-rules-card {
  display: grid;
  min-height: 190px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  border: 1px solid #aab9e8;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  background:
    linear-gradient(145deg, rgba(35, 67, 163, 0.08), rgba(35, 67, 163, 0.04)),
    #fafbff;
}

.embedded-rules-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  align-self: center;
  border-radius: 22px;
  color: white;
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
  font-size: 38px;
  font-weight: 900;
}

.embedded-rules-content {
  min-width: 0;
}

.embedded-rules-title {
  margin: 0 0 20px;
  color: var(--navy-900);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.035em;
}

.embedded-rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.embedded-rules-list > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.embedded-rules-list dt {
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 900;
}

.embedded-rules-list dd {
  min-width: 0;
  margin: 0;
  color: #425466;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upload-zone {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1.5px dashed #8db4c8;
  border-radius: var(--radius-md);
  padding: 22px 16px 18px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(20, 45, 133, 0.04), rgba(35, 67, 163, 0.05)),
    var(--surface-soft);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

button.upload-zone {
  width: 100%;
  appearance: none;
  font-family: inherit;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--teal-600);
  background: var(--teal-50);
  transform: translateY(-1px);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.auto-upload-zone {
  border-style: solid;
  border-color: #aab9e8;
  background:
    linear-gradient(145deg, rgba(35, 67, 163, 0.08), rgba(35, 67, 163, 0.04)),
    #fafbff;
}

.auto-upload-zone .upload-icon {
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
}

.auto-upload-zone[data-state="permission"] {
  border-color: #e6bd63;
  background: #fffbeb;
}

.auto-upload-zone[data-state="error"],
.auto-upload-zone[data-state="unsupported"] {
  border-color: #d6b4b4;
  background: #fffafa;
}

.upload-zone.is-loading {
  cursor: wait;
  pointer-events: none;
}

.upload-zone.is-loading .upload-icon {
  animation: upload-pulse 900ms ease-in-out infinite alternate;
}

@keyframes upload-pulse {
  from {
    opacity: 0.55;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.upload-method-tag {
  position: absolute;
  top: 11px;
  right: 11px;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--navy-700);
  background: #e6eef5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.auto-upload-zone .upload-method-tag {
  color: var(--teal-700);
  background: #e4eaff;
}

.auto-upload-renewal-note {
  display: block;
  margin-top: 8px;
  color: #627789;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.4;
}

.direct-file-picker {
  cursor: pointer;
}

.direct-file-picker .upload-icon {
  background: var(--navy-700);
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 14px;
  color: white;
  background: var(--teal-700);
  font-size: 25px;
  font-weight: 500;
}

.upload-title {
  color: var(--navy-900);
  font-size: 15px;
  font-weight: 850;
}

.upload-copy {
  max-width: 100%;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.upload-format {
  margin-top: 14px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--navy-700);
  background: #e6eef5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.settings-panel {
  display: flex;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--surface);
}

.field {
  display: block;
}

.field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #425466;
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

input:hover,
select:hover {
  border-color: #8da4b8;
}

input:focus,
select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(35, 67, 163, 0.1);
  outline: 0;
}

select:disabled {
  cursor: not-allowed;
  color: #8a99a8;
  background: #f3f6f8;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.suffix-input {
  position: relative;
}

.suffix-input input {
  padding-right: 38px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.suffix-input > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  font-weight: 800;
}

.currency-input input {
  padding-right: 42px;
  letter-spacing: 0.01em;
}

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  border-radius: 10px;
  padding: 11px 12px;
  color: #476070;
  background: #f2f7fa;
  font-size: 11px;
}

.hint-box p {
  margin: 0;
}

.hint-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--teal-600);
}

.recognition-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.recognition-summary.is-empty {
  opacity: 0.66;
}

.summary-item {
  padding: 12px 14px;
  background: #f9fbfc;
}

.summary-item span,
.summary-item strong {
  display: block;
}

.summary-item span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.summary-item strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-heading {
  align-items: center;
  margin: 0;
  padding: 24px 26px 20px;
}

.result-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

#result-title {
  margin: 0;
  line-height: 36px;
}

.insurance-type-switch {
  display: inline-grid;
  flex: 0 0 auto;
  align-self: center;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #9aabbb;
  border-radius: 10px;
  background: #f4f7f9;
}

.insurance-type-button {
  min-width: 82px;
  min-height: 36px;
  border: 0;
  padding: 7px 12px;
  color: #536678;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  transition:
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.insurance-type-button + .insurance-type-button {
  border-left: 1px solid #9aabbb;
}

.insurance-type-button:hover,
.insurance-type-button:focus-visible {
  color: var(--navy-900);
  background: #e9eff3;
}

.insurance-type-button.is-active {
  color: white;
  background: var(--navy-800);
  box-shadow: inset 0 0 0 1px var(--navy-800);
}

.strategy-lookup-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  align-self: center;
  gap: 6px;
  border: 1px solid #aab9e8;
  border-radius: 10px;
  padding: 6px 11px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.strategy-lookup-button:hover,
.strategy-lookup-button:focus-visible {
  border-color: var(--teal-600);
  background: #e9edff;
  transform: translateY(-1px);
}

.strategy-lookup-button:disabled {
  border-color: #d8e0e6;
  color: #91a0ad;
  background: #f4f7f9;
  transform: none;
  cursor: default;
}

.strategy-lookup-icon {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.reference-download-links {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.reference-download-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--teal-700);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: #aab9e8;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.reference-download-link:hover,
.reference-download-link:focus-visible {
  color: var(--navy-900);
  text-decoration-color: currentColor;
}

.reference-download-link.is-loading,
.reference-download-link.is-unavailable {
  color: #91a0ad;
  text-decoration-color: #cbd4db;
  cursor: default;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-badge {
  color: var(--teal-700);
  background: var(--teal-100);
}

.ghost-button,
.secondary-button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 800;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  color: #d8e5ef;
  background: rgba(255, 255, 255, 0.08);
}

.modal-actions .ghost-button {
  color: var(--navy-700);
  background: #eef3f7;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--navy-700);
  background: white;
}

.primary-button {
  color: white;
  background: var(--teal-700);
}

.text-button {
  padding-right: 4px;
  color: var(--teal-700);
  background: transparent;
}

.tier-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 12px 26px;
  background: #f8fafc;
}

.tier-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.tier-tab.active {
  border-color: var(--navy-800);
  color: white;
  background: var(--navy-800);
}

.empty-state {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  border-top: 1px solid var(--line);
  padding: 44px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #f9fbfc);
}

.empty-visual {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 18px;
  color: var(--navy-700);
  background: #e4edf3;
  font-size: 29px;
}

.empty-state h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 18px;
}

.empty-state p {
  max-width: 480px;
  margin: 7px 0 0;
  color: var(--muted);
}

.table-wrap {
  max-height: 66vh;
  overflow: auto;
  margin: 0 24px 26px;
  border: 1px solid #d8dee3;
  border-radius: 10px;
  padding: 22px 24px 24px;
  background: #fff;
}

.fee-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #111827;
  background: white;
  border-top: 1px solid #c9c0a2;
  border-left: 1px solid #c9c0a2;
}

.fee-table th,
.fee-table td {
  height: 42px;
  border-right: 1px solid #c9c0a2;
  border-bottom: 1px solid #c9c0a2;
  padding: 7px 6px;
  text-align: center;
  vertical-align: middle;
}

.fee-table th:last-child,
.fee-table td:last-child {
  border-right: 0;
}

.fee-table thead th {
  position: sticky;
  z-index: 4;
  top: 0;
  height: 38px;
  color: #111827;
  background: #efede2;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.fee-table thead .company-table-title {
  top: 0;
  height: 30px;
  background: #e8e5d7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.fee-table thead .period-title-row th {
  top: 30px;
  height: 38px;
}

.fee-table thead .combined-period {
  line-height: 1.25;
}

.fee-table thead .company-title-row .group-column,
.fee-table thead .company-title-row .product-column {
  top: 0;
  height: 68px;
}

.fee-table tbody tr {
  background: white;
  transition: background 120ms ease;
}

.fee-table tbody tr:hover {
  background: #fffdf6;
}

.fee-table tbody tr.is-calculated {
  background: #ecf8f0;
}

.fee-table tbody tr.is-calculated:hover {
  background: #e4f4ea;
}

.fee-table tbody tr.is-calculated > td {
  background: #ecf8f0;
}

.fee-table tbody tr.is-calculated:hover > td {
  background: #e4f4ea;
}

.fee-table .group-column {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}

.fee-table .product-column {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.fee-table .total-column {
  width: 92px;
}

.fee-table .summary-column {
  width: 82px;
  background: #fff5a8;
}

.group-cell {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  color: #111827;
  border-right: 1px solid #c9c0a2 !important;
  padding: 12px 14px !important;
  background: #fff !important;
  text-align: center !important;
  line-height: 1.4;
}

.group-tier,
.group-name {
  display: block;
}

.group-tier {
  margin-bottom: 7px;
  color: var(--teal-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.group-name {
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.product-cell {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  border-right: 2px solid #b1a783 !important;
  box-shadow: 7px 0 10px -12px rgba(61, 54, 33, 0.8);
  padding: 4px 7px !important;
  background: #fff !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.fee-table thead .group-column {
  left: 0;
  z-index: 6;
}

.fee-table thead .product-column {
  left: 0;
  z-index: 6;
  border-right: 2px solid #9f9573;
}

/* 머리글의 세로 고정을 해제해 100% 확대 스크롤에서도 본문 행을 덮지 않게 한다. */
.fee-table thead {
  position: static;
  z-index: 5;
  top: auto;
}

.fee-table thead th {
  position: static;
  top: auto;
}

.fee-table thead .product-column {
  position: static;
  top: auto;
  left: auto;
  vertical-align: middle;
}

.fee-table tbody tr.is-calculated .product-cell {
  background: #e7f6ec !important;
}

.fee-table tbody tr.is-calculated:hover .product-cell {
  background: #ddf1e4 !important;
}

.product-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 38px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  padding: 6px 8px;
  color: #111827;
  background: transparent;
  text-align: center;
  font-size: 11px;
  font-weight: 750;
}

.product-button:hover {
  background: rgba(20, 45, 133, 0.08);
}

.product-button .edit-label {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: var(--teal-700);
  font-size: 10px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.product-button:hover .edit-label,
.product-button.has-rates .edit-label {
  opacity: 1;
}

.product-button.has-rates::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--teal-600);
}

.product-button .product-name {
  display: block;
  width: 100%;
  line-height: 1.3;
  text-align: center;
}

.product-button.has-rates .product-name {
  padding: 0 30px;
}

.nonlife-product-name {
  display: grid;
  width: 100%;
  min-height: 38px;
  place-items: center;
  padding: 6px 8px;
  color: #111827;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

.value-cell {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

.value-cell .value {
  display: block;
  color: #111827;
  font-size: 11px;
  font-weight: 700;
}

.summary-start {
  border-left: 2px solid #d2c44e !important;
}

.summary-cell {
  background: #fffbe0;
  text-align: center !important;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.fee-table tbody tr.is-calculated > .summary-cell {
  background: #e5f5db;
}

.fee-table tbody tr.is-calculated:hover > .summary-cell {
  background: #dcefd2;
}

.value-cell .source {
  display: block;
  margin-top: 2px;
  color: #8a99a8;
  font-size: 9px;
}

.value-cell.is-empty {
  color: #9aa8b5;
  text-align: center;
}

.value-cell.is-warning {
  color: #a16207;
  background: #fffbeb;
}

.total-cell {
  color: #111827;
  background: #f5f2e8;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 900;
}

.result-rate {
  display: block;
}

.monthly-premium-result {
  display: block;
  margin-top: 5px;
  border-top: 1px solid rgba(97, 112, 127, 0.2);
  padding-top: 4px;
  color: #4b6479;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
}

.monthly-premium-result strong {
  display: block;
  margin-top: 1px;
  color: #142d85;
  font-size: 9px;
  font-weight: 900;
}

.rule-details {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.rule-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 26px;
  color: var(--navy-800);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.rule-details summary::-webkit-details-marker {
  display: none;
}

.rule-details summary::after {
  content: "+";
  margin-left: 10px;
  font-size: 18px;
}

.rule-details[open] summary::after {
  content: "−";
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 26px 22px;
}

.rule-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

.rule-item strong,
.rule-item span {
  display: block;
}

.rule-item strong {
  color: var(--navy-900);
  font-size: 11px;
}

.rule-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.rule-item.warn {
  border-color: #f5d48b;
  background: #fffdf5;
}

.footnote {
  margin: 16px 3px 0;
  color: #728394;
  font-size: 10px;
  text-align: center;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.62);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 22px;
  padding: 26px;
  background: white;
  box-shadow: 0 28px 80px rgba(11, 31, 51, 0.26);
}

.startup-check-modal {
  z-index: 1100;
}

.location-consent-modal {
  z-index: 1200;
}

.location-consent-panel {
  width: min(560px, 100%);
  padding: 38px 36px 32px;
  text-align: center;
}

.location-consent-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal-700), #3458b7);
  box-shadow: 0 14px 30px rgba(20, 45, 133, 0.22);
  font-size: 32px;
  line-height: 1;
}

.location-consent-panel h2 {
  margin: 4px 0 10px;
  color: var(--navy-900);
  font-size: clamp(23px, 3vw, 29px);
  letter-spacing: -0.04em;
}

.location-consent-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.location-consent-boundary {
  margin: 22px 0 0;
  border: 1px solid #cbd5f4;
  border-radius: 16px;
  padding: 15px 18px;
  color: var(--navy-800);
  background: #f5f7ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
}

.location-consent-status {
  min-height: 24px;
  margin: 15px 0 0;
  color: #596b7e;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.location-consent-status.is-checking {
  color: var(--teal-700);
}

.location-consent-status.is-success {
  color: #142d85;
}

.location-consent-status.is-error {
  color: #ad3d3d;
}

.location-consent-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.location-consent-actions button {
  min-width: 142px;
}

.startup-check-panel {
  width: min(650px, 100%);
  padding: 36px 36px 30px;
  text-align: center;
}

.startup-check-symbol {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #e8edff, #e9f1f8);
}

.startup-check-symbol::before,
.startup-check-symbol::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.startup-check-symbol::before {
  width: 31px;
  height: 31px;
  border: 4px solid rgba(20, 45, 133, 0.2);
  border-top-color: var(--teal-700);
  animation: startup-check-spin 0.9s linear infinite;
}

.startup-check-symbol::after {
  width: 7px;
  height: 7px;
  background: var(--teal-700);
}

.startup-check-symbol.is-complete::before {
  top: 50%;
  left: 50%;
  width: 18px;
  height: 10px;
  border: 0;
  border-right: 4px solid #142d85;
  border-bottom: 4px solid #142d85;
  border-radius: 0;
  transform: translate(-50%, -62%) rotate(45deg);
  transform-origin: center;
  animation: none;
}

.startup-check-symbol.is-complete::after {
  display: none;
}

.startup-check-symbol.is-error::before {
  width: auto;
  height: auto;
  border: 0;
  color: #b33a3a;
  content: "!";
  font-size: 34px;
  font-weight: 900;
  animation: none;
}

.startup-check-symbol.is-error::after {
  display: none;
}

@keyframes startup-check-spin {
  to {
    transform: rotate(360deg);
  }
}

.startup-check-panel h2 {
  margin: 4px 0 8px;
  color: var(--navy-900);
  font-size: clamp(23px, 3vw, 29px);
  letter-spacing: -0.04em;
}

.startup-check-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.startup-check-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.startup-check-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  border: 1px solid #dbe5ed;
  border-radius: 16px;
  padding: 11px 14px;
  color: #768698;
  background: #f7f9fb;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.startup-check-item.is-active {
  border-color: #8ea5e5;
  color: var(--navy-800);
  background: #f5f7ff;
}

.startup-check-item.is-success {
  border-color: #b6c4ee;
  color: var(--navy-800);
  background: #f5f7ff;
}

.startup-check-item.is-warning {
  border-color: #ebc879;
  color: var(--navy-800);
  background: #fff9e9;
}

.startup-check-item.is-error {
  border-color: #e6b1b1;
  color: var(--navy-800);
  background: #fff5f5;
}

.startup-check-number {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #708093;
  background: #e8eef3;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.startup-check-item.is-active .startup-check-number {
  color: #fff;
  background: var(--teal-700);
}

.startup-check-item.is-success .startup-check-number {
  color: transparent;
  background: #1d3d9c;
  font-size: 0;
}

.startup-check-item.is-success .startup-check-number::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  content: "✓";
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.startup-check-item.is-warning .startup-check-number {
  color: #8b5b00;
  background: #fce8a9;
}

.startup-check-item.is-error .startup-check-number {
  color: #fff;
  background: #bd4b4b;
}

.startup-check-text {
  min-width: 0;
}

.startup-check-text strong,
.startup-check-text small {
  display: block;
}

.startup-check-text strong {
  color: inherit;
  font-size: 14px;
}

.startup-check-text small {
  overflow: hidden;
  margin-top: 4px;
  color: #718094;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.startup-check-status {
  min-width: 82px;
  border-radius: 999px;
  padding: 7px 11px;
  color: #738194;
  background: #e9eef3;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.startup-check-item.is-active .startup-check-status {
  color: #142d85;
  background: #e2e8ff;
}

.startup-check-item.is-success .startup-check-status {
  color: #142d85;
  background: #e2e8ff;
}

.startup-check-item.is-warning .startup-check-status {
  color: #8b5b00;
  background: #fce8a9;
}

.startup-check-item.is-error .startup-check-status {
  color: #a23838;
  background: #f8dddd;
}

.startup-progress {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e6edf2;
}

.startup-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), #4868bf);
  transition: width 280ms ease;
}

.startup-check-summary {
  min-height: 22px;
  margin: 13px 0 0;
  color: #526274;
  font-size: 12px;
  font-weight: 750;
}

.startup-check-summary.is-success {
  color: #142d85;
}

.startup-check-summary.is-error {
  color: #ad3d3d;
}

.startup-check-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}

.startup-check-actions button {
  min-width: 150px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 24px;
}

.modal-header p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  color: var(--navy-700);
  background: #eef3f7;
  font-size: 24px;
}

.update-modal-panel {
  width: min(520px, 100%);
  padding: 34px 32px 30px;
  text-align: center;
}

.update-modal-panel .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.update-modal-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, var(--teal-600), var(--navy-700));
  font-size: 28px;
  font-weight: 800;
}

.update-modal-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 25px;
  letter-spacing: -0.035em;
}

.update-modal-copy {
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.update-version-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  text-align: left;
}

.update-version-list > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 15px;
  background: #f8fbfd;
}

.update-version-list dt {
  color: #5f7182;
  font-size: 12px;
  font-weight: 800;
}

.update-version-list dd {
  margin: 0;
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.update-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.update-modal-actions > * {
  min-width: 150px;
}

.update-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auto-upload-notice-panel {
  width: min(520px, 100%);
  overflow: hidden;
  padding: 34px 30px 28px;
  text-align: center;
}

.auto-upload-notice-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 17px;
  color: #9a6700;
  background: #fff3cd;
  box-shadow: inset 0 0 0 1px #efd189;
  font-size: 28px;
  font-weight: 900;
}

.auto-upload-notice-icon.is-info {
  color: var(--teal-700);
  background: #e8edff;
  box-shadow: inset 0 0 0 1px #bdc9ef;
}

.auto-upload-notice-panel .eyebrow {
  margin-bottom: 5px;
}

.auto-upload-notice-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.auto-upload-notice-copy {
  margin: 15px 0 0;
  color: #526779;
  font-size: 14px;
  line-height: 1.8;
}

.auto-upload-notice-copy strong {
  color: #b45309;
}

.auto-upload-source-path {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #c6d9e5;
  border-radius: 14px;
  color: #324c61;
  background: #f5f9fb;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.8;
  word-break: keep-all;
}

.auto-upload-source-path strong {
  color: var(--teal-700);
}

.auto-upload-file-name {
  color: var(--navy-900);
  font-weight: 900;
}

.auto-upload-source-copy {
  margin-top: 11px;
  font-weight: 750;
}

.auto-upload-notice-copy.is-emphasized {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.75;
  word-break: keep-all;
}

.auto-upload-folder-picker-guide {
  margin: 18px 0 0;
  border: 1px solid #b8d8e2;
  border-radius: 14px;
  padding: 15px 16px;
  color: #385568;
  background: #f3fafb;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.75;
  word-break: keep-all;
}

.auto-upload-folder-picker-guide strong {
  color: var(--teal-700);
  font-weight: 900;
}

.auto-upload-result-panel {
  width: min(560px, 100%);
  padding: 32px 30px 28px;
  text-align: center;
}

.auto-upload-result-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.auto-upload-result-directory {
  margin: 12px 0 0;
  color: #5d7182;
  font-size: 13px;
  font-weight: 800;
}

.auto-upload-result-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}

.auto-upload-result-row {
  display: grid;
  grid-template-columns: 26px 72px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #c4cff0;
  border-radius: 13px;
  padding: 13px 14px;
  color: var(--navy-900);
  background: #f5f7ff;
}

.auto-upload-result-row.is-missing {
  border-color: #efc6c6;
  background: #fff6f6;
}

.auto-upload-result-status {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-700);
  font-size: 13px;
  font-weight: 900;
}

.auto-upload-result-row.is-missing .auto-upload-result-status {
  background: #c24141;
}

.auto-upload-result-label {
  color: var(--teal-700);
  font-size: 12px;
  font-weight: 900;
}

.auto-upload-result-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-upload-result-row.is-missing strong {
  color: #b33a3a;
}

.auto-upload-result-summary {
  margin: 18px 0 0;
  color: #3e596b;
  font-size: 14px;
  font-weight: 800;
}

.auto-upload-result-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.direct-upload-notice-panel {
  width: min(540px, 100%);
  padding: 34px 30px 28px;
  text-align: center;
}

.direct-upload-notice-panel h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.direct-upload-file-list {
  text-align: left;
}

.direct-upload-multiple-copy {
  margin: 16px 0 0;
  color: #4e6576;
  font-size: 14px;
  font-weight: 750;
}

.direct-upload-multiple-copy strong {
  color: var(--teal-700);
  font-weight: 900;
}

.direct-upload-notice-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auto-upload-notice-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.auto-upload-notice-actions .primary-button,
.auto-upload-notice-actions .secondary-button {
  min-width: 124px;
}

.auto-upload-notice-page[hidden],
.auto-upload-notice-actions [hidden] {
  display: none;
}

.auto-upload-notice-page-count {
  min-width: 42px;
  color: #6a7d8d;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.guide-panel {
  width: min(960px, 100%);
  overflow: hidden;
  padding: 0;
}

.guide-header {
  padding: 24px 26px 20px;
}

.guide-menu {
  display: grid;
  gap: 14px;
  padding: 4px 26px 28px;
}

.guide-menu-card {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 21px 22px;
  border: 1px solid #cbd9e4;
  border-radius: 17px;
  color: var(--navy-900);
  background: #f9fbfc;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.guide-menu-card:hover,
.guide-menu-card:focus-visible {
  border-color: var(--teal-600);
  background: var(--teal-50);
  box-shadow: 0 10px 24px rgba(20, 45, 133, 0.1);
  transform: translateY(-1px);
}

.guide-menu-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(145deg, var(--teal-700), var(--navy-700));
  font-size: 19px;
  font-weight: 900;
}

.guide-menu-copy {
  display: grid;
  gap: 6px;
}

.guide-menu-copy strong {
  font-size: 17px;
  letter-spacing: -0.025em;
}

.guide-menu-copy small {
  color: #6a7d8d;
  font-size: 12px;
  font-weight: 750;
}

.guide-menu-arrow {
  color: var(--teal-700);
  font-size: 23px;
  font-weight: 900;
  text-align: center;
}

.guide-menu[hidden],
.guide-view[hidden],
.guide-media[hidden] {
  display: none;
}

.guide-view-toolbar {
  padding: 0 26px 12px;
}

.guide-back {
  border: 0;
  color: var(--teal-700);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.guide-back:hover,
.guide-back:focus-visible {
  text-decoration: underline;
}

.guide-stage {
  margin: 0 26px;
  overflow: hidden;
  border: 1px solid #d4dee7;
  border-radius: 16px;
  background: #091747;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.guide-media {
  display: block;
  width: 100%;
  max-height: min(62vh, 650px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.guide-video {
  background: #091747;
}

.guide-image {
  background: #f3f6f8;
}

.guide-navigation {
  display: grid;
  grid-template-columns: 48px minmax(78px, auto) 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 26px 24px;
}

.guide-arrow {
  display: grid;
  width: 48px;
  height: 42px;
  place-items: center;
  border: 1px solid #bed0df;
  border-radius: 12px;
  color: var(--navy-800);
  background: white;
  font-size: 22px;
  font-weight: 800;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.guide-arrow:hover:not(:disabled),
.guide-arrow:focus-visible {
  border-color: var(--teal-600);
  background: var(--teal-50);
  transform: translateY(-1px);
}

.guide-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.guide-page {
  min-width: 78px;
  color: var(--navy-800);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  letter-spacing: 0.03em;
}

.strategy-modal-panel {
  display: flex;
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: hidden;
  flex-direction: column;
  padding: 0;
}

.strategy-modal-header {
  flex: 0 0 auto;
  padding: 24px 26px 18px;
}

.strategy-search-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  border-top: 1px solid #edf2f6;
  padding: 16px 26px;
  background: #f8fbfc;
}

.strategy-search-box {
  position: relative;
  flex: 1;
}

.strategy-search-box input {
  height: 48px;
  padding: 0 46px 0 44px;
  border-color: #b9cad7;
  background: white;
  font-size: 13px;
}

.strategy-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  color: var(--teal-700);
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 22px;
  line-height: 1;
}

.strategy-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #66788a;
  background: #eaf0f4;
  transform: translateY(-50%);
  font-size: 18px;
}

.strategy-search-clear[hidden] {
  display: none;
}

.strategy-result-count {
  min-width: 82px;
  color: var(--teal-700);
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.strategy-result-table {
  display: flex;
  min-height: 240px;
  overflow: hidden;
  flex: 1;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.strategy-result-head,
.strategy-result-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(100px, 0.55fr) minmax(280px, 2.2fr);
  align-items: center;
  gap: 14px;
}

.strategy-result-head {
  flex: 0 0 auto;
  padding: 11px 26px;
  color: #526779;
  background: #eef3f6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.strategy-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.strategy-result-row {
  min-height: 53px;
  border-bottom: 1px solid #e7edf2;
  padding: 10px 26px;
  background: white;
  font-size: 12px;
}

.strategy-result-row:hover {
  background: #f7f8ff;
}

.strategy-company {
  color: var(--navy-800);
  font-weight: 850;
}

.strategy-tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal-700);
  background: #e8edff;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.strategy-product {
  min-width: 0;
  color: #243746;
  overflow-wrap: anywhere;
}

.strategy-result-row mark {
  border-radius: 3px;
  padding: 0 1px;
  color: inherit;
  background: #fef3a8;
}

.strategy-empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.strategy-empty-state strong {
  margin-top: 8px;
  color: var(--navy-800);
  font-size: 14px;
}

.strategy-empty-state p {
  max-width: 440px;
  margin: 5px 0 0;
  font-size: 11px;
}

.strategy-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--teal-700);
  background: var(--teal-50);
  font-size: 26px;
}

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.conversion-grid.is-single {
  grid-template-columns: 1fr;
}

.formula-preview {
  margin-top: 18px;
  border: 1px solid #cbd5f4;
  border-radius: 12px;
  padding: 13px 14px;
  color: #334c91;
  background: var(--teal-50);
  font-size: 11px;
}

.formula-preview:empty {
  display: none;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions > div {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  z-index: 1100;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100% - 40px));
  border-radius: 12px;
  padding: 12px 15px;
  color: white;
  background: var(--navy-900);
  box-shadow: 0 15px 35px rgba(11, 31, 51, 0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  font-size: 12px;
  font-weight: 750;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #991b1b;
}

@media (max-width: 1050px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .upload-zone {
    min-height: 160px;
  }

  .embedded-rules-card {
    min-height: 0;
  }

  .recognition-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .main {
    width: min(100% - 24px, 1480px);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand .eyebrow,
  .status-pill {
    display: none;
  }

  .brand h1 {
    font-size: 17px;
  }

  .control-card {
    padding: 19px;
  }

  .upload-methods {
    grid-template-columns: 1fr;
  }

  .upload-zone {
    min-height: 155px;
  }

  .embedded-rules-card {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 19px;
  }

  .embedded-rules-icon,
  .version-check-row {
    justify-self: start;
  }

  .embedded-rules-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .section-heading {
    flex-direction: column;
  }

  .field-row,
  .conversion-grid {
    grid-template-columns: 1fr;
  }

  .recognition-summary {
    grid-template-columns: 1fr 1fr;
  }

  .result-heading {
    padding: 20px;
  }

  .table-wrap {
    margin: 0 12px 16px;
    padding: 12px;
  }

  .result-actions {
    width: 100%;
    justify-content: space-between;
  }

  .result-title-line {
    align-items: flex-start;
  }

  .modal-panel {
    padding: 20px;
  }

  .startup-check-panel {
    padding: 27px 18px 22px;
  }

  .startup-check-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .startup-check-status {
    grid-column: 2;
    min-width: 0;
    justify-self: start;
  }

  .startup-check-text small {
    white-space: normal;
  }

  .startup-check-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .startup-check-actions button {
    width: 100%;
  }

  .guide-panel {
    padding: 0;
  }

  .guide-header {
    padding: 20px 20px 16px;
  }

  .guide-stage {
    margin: 0 12px;
    border-radius: 12px;
  }

  .guide-navigation {
    gap: 14px;
    padding: 16px 20px 20px;
  }

  .strategy-modal-panel {
    max-height: calc(100vh - 24px);
    padding: 0;
  }

  .strategy-modal-header {
    padding: 20px 20px 16px;
  }

  .strategy-search-area {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    padding: 14px 16px;
  }

  .strategy-result-count {
    min-width: 0;
    text-align: left;
  }

  .strategy-result-head,
  .strategy-result-row {
    grid-template-columns: 90px 82px minmax(160px, 1fr);
    gap: 9px;
  }

  .strategy-result-head,
  .strategy-result-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions > div,
  .modal-actions button {
    flex: 1;
  }

  .modal-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lock-panel {
    padding: 30px 24px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-row button {
    min-height: 44px;
  }
}

@media print {
  .app-header,
  .control-card,
  .result-actions,
  .tier-tabs,
  .rule-details,
  .footnote {
    display: none !important;
  }

  body {
    background: white;
  }

  .main {
    width: 100%;
    margin: 0;
  }

  .result-card {
    border: 0;
    box-shadow: none;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }
}

.install-modal {
  z-index: 1300;
}

.install-panel {
  width: min(560px, 100%);
  padding: 38px 36px 32px;
  text-align: center;
}

.install-symbol {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal-700), #3458b7);
  box-shadow: 0 14px 30px rgba(20, 45, 133, 0.22);
}

.install-symbol-screen {
  width: 39px;
  height: 29px;
  border: 3px solid currentColor;
  border-radius: 5px;
}

.install-symbol-screen::after {
  position: absolute;
  right: 23px;
  bottom: 15px;
  left: 23px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.install-symbol-arrow {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  color: var(--teal-700);
  background: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 22px;
}

.install-panel h2 {
  margin: 4px 0 10px;
  color: var(--navy-900);
  font-size: clamp(23px, 3vw, 29px);
  letter-spacing: -0.04em;
}

.install-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.install-benefit {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  border: 1px solid #cbd5f4;
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--navy-800);
  background: #f5f7ff;
  line-height: 1.55;
}

.install-benefit strong {
  font-size: 14px;
  font-weight: 900;
}

.install-benefit span {
  color: #596b7e;
  font-size: 12px;
  font-weight: 700;
}

.install-status {
  min-height: 20px;
  margin: 15px 0 0;
  color: #596b7e;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.install-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.install-actions button {
  min-width: 142px;
}

.suggestion-header-button {
  min-height: 38px;
  border: 1px solid #aab9e8;
  border-radius: 999px;
  padding: 0 17px;
  color: #142d85;
  background: #f2f5ff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.suggestion-header-button:hover,
.suggestion-header-button:focus-visible {
  border-color: #142d85;
  background: #dce5ff;
  transform: translateY(-1px);
}

.suggestion-modal {
  z-index: 1250;
}

.suggestion-panel {
  width: min(620px, 100%);
  padding: 34px 34px 30px;
}

.suggestion-panel h2 {
  margin: 4px 0 8px;
  color: var(--navy-900);
  font-size: 27px;
  letter-spacing: -0.04em;
}

.suggestion-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.suggestion-copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.suggestion-form {
  display: grid;
  gap: 17px;
}

.suggestion-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.suggestion-field-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.suggestion-content-field {
  position: relative;
}

.suggestion-content-field textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px 34px;
  color: var(--navy-900);
  background: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.suggestion-content-field textarea:focus {
  border-color: #142d85;
  box-shadow: 0 0 0 3px rgba(20, 45, 133, 0.12);
}

.suggestion-character-count {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.suggestion-status {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.suggestion-status.is-success {
  color: #142d85;
}

.suggestion-status.is-error {
  color: #b42318;
}

.suggestion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.suggestion-actions button {
  min-width: 132px;
}

@media (max-width: 640px) {
  .install-panel {
    padding: 28px 20px 22px;
  }

  .install-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .install-actions button {
    width: 100%;
  }

  .suggestion-panel {
    padding: 28px 20px 22px;
  }

  .suggestion-field-row {
    grid-template-columns: 1fr;
  }
}

/* INCAR brand palette and fixed desktop canvas */
:root {
  --navy-950: #091747;
  --navy-900: #0e2268;
  --navy-800: #142d85;
  --navy-700: #2343a3;
  --teal-700: #142d85;
  --teal-600: #2343a3;
  --teal-100: #dce5ff;
  --teal-50: #f2f5ff;
  --page: #eef2fb;
  --shadow: 0 18px 45px rgba(20, 45, 133, 0.1);
}

html,
body,
.app-shell {
  min-width: 1180px;
}

.app-header {
  color: #142d85;
  border-bottom: 1px solid #dce5ff;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(20, 45, 133, 0.09);
}

.header-inner,
.main {
  width: min(1480px, calc(100% - 40px));
  min-width: 1140px;
}

.header-inner {
  min-height: 76px;
}

.brand .eyebrow,
.status-pill {
  display: inline-flex;
}

.brand h1 {
  color: #142d85;
  font-size: 20px;
}

.brand-mark.brand-logo {
  width: 112px;
  height: 42px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.brand .eyebrow {
  color: #142d85;
}

.app-header .status-pill.neutral {
  color: #142d85;
  background: #f2f5ff;
}

.app-header .status-pill.ok {
  color: #142d85;
  background: #dce5ff;
}

.control-card {
  padding: 26px;
}

.control-grid {
  grid-template-columns: minmax(560px, 1.25fr) minmax(340px, 0.75fr);
}

.upload-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.embedded-rules-card {
  min-height: 190px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
}

.embedded-rules-icon,
.version-check-row {
  justify-self: auto;
}

.embedded-rules-list > div {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
}

.section-heading,
.result-heading,
.result-title-line {
  align-items: center;
  flex-direction: row;
}

.setup-title-line,
.result-title-line,
.reference-download-links {
  flex-wrap: nowrap;
}

.conversion-grid {
  grid-template-columns: repeat(2, 1fr);
}

.recognition-summary {
  grid-template-columns: repeat(4, 1fr);
}

.result-heading {
  padding: 24px 26px 20px;
}

.result-actions {
  width: auto;
  justify-content: flex-start;
}

.table-wrap {
  margin: 0 24px 26px;
  padding: 22px 24px 24px;
}

.location-consent-office-only {
  margin-top: 20px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.75;
  text-align: center;
}
