/* FMSAFEAI VISUAL SYNC v1.1
   Visual language matched to the existing FMSAFEAI operational pages. */
:root{
  --bg:#f2f3f5;
  --surface:#ffffff;
  --surface-2:#f1f2f4;
  --ink:#111827;
  --muted:#6b7280;
  --line:#dde2ea;
  --accent:#4367c6;
  --accent-2:#3d7a4a;
  --accent-soft:#edf2fb;
  --fms-red:#d93630;
  --fms-red-dark:#b92523;
  --fms-blue:#4367c6;
  --fms-green:#3f7b48;
  --radius:18px;
  --shadow:0 12px 32px rgba(26,32,44,.08);
}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:Pretendard,"Noto Sans KR","Apple SD Gothic Neo",system-ui,-apple-system,sans-serif}
.site-shell{background:var(--bg)!important;min-height:100vh;overflow:visible}
.wrap{width:min(1418px,calc(100% - 48px))}

/* Shared FMSAFEAI top navigation */
.topbar{height:68px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px}
.fms-brand{font-size:16px!important;gap:2px!important;white-space:nowrap}
.fms-brand-mark{width:22px;height:22px;display:grid;place-items:center;color:var(--fms-red);margin-right:5px}
.fms-brand-mark svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.fms-brand-sub{display:none!important}
.nav.fms-nav{gap:4px!important;margin-left:52px;margin-right:auto;flex-wrap:nowrap}
.nav.fms-nav a{display:inline-flex;align-items:center;gap:7px;padding:11px 12px;border-radius:12px;color:#454b57;font-size:13px;font-weight:750;white-space:nowrap;text-decoration:none}
.nav.fms-nav a svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nav.fms-nav a:hover{background:#f4f5f7;color:#1e293b}
.nav.fms-nav a.active{background:var(--fms-red);color:#fff;box-shadow:0 6px 15px rgba(217,54,48,.22)}
.fms-login{display:inline-flex;align-items:center;justify-content:center;border:1px solid #e0e3e8;border-radius:14px;padding:10px 17px;background:#fff;color:#4c515b;text-decoration:none;font-size:13px;font-weight:800;white-space:nowrap}
.fms-header-band{background:#fff;border-bottom:1px solid #e2e5ea;box-shadow:0 1px 0 rgba(19,24,35,.02)}

/* Page header, matched to FMSAFEAI risk-assessment screen */
.tool-main{padding-bottom:64px}
.fms-page-banner{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:130px;margin:24px 0 34px;padding:28px 30px;background:linear-gradient(100deg,#fff 0%,#fff 54%,#fff5f5 100%);border:1px solid #eadfe0;border-radius:22px;box-shadow:0 14px 34px rgba(28,33,43,.10)}
.fms-page-banner:before{content:"";position:absolute;left:0;right:0;top:0;height:5px;background:repeating-linear-gradient(135deg,#181818 0 10px,var(--fms-red) 10px 20px)}
.fms-page-title{display:flex;align-items:center;gap:20px;min-width:0}
.fms-page-icon{width:64px;height:64px;flex:0 0 64px;display:grid;place-items:center;border:1px solid #f0d7d7;border-radius:18px;background:#fff;color:var(--fms-red);box-shadow:0 8px 18px rgba(191,46,43,.09)}
.fms-page-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fms-page-copy h1{font-size:31px;line-height:1.15;letter-spacing:-.045em;margin:0 0 11px;font-weight:900;color:#10131a}
.fms-page-copy p{margin:0;color:#6d7480;font-size:13px}
.fms-page-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.fms-back-btn,.fms-storage-chip{display:inline-flex;align-items:center;gap:7px;min-height:42px;border-radius:13px;padding:0 14px;background:#fff;border:1px solid #dde2ea;color:#4967a7;text-decoration:none;font-size:12px;font-weight:800}
.fms-back-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9}
.fms-storage-chip{color:#5f6672;border-radius:999px;padding:0 15px}
.fms-storage-chip:before{content:"";width:8px;height:8px;border-radius:50%;background:#4f8a61}

/* 8-stage navigator */
.fms-process-rail{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin:0 14px 16px;padding:11px;background:#fff;border:1px solid #eef0f3;border-radius:18px}
.fms-process-step{min-height:55px;display:grid;place-items:center;text-align:center;padding:7px 8px;border:0;border-radius:13px;background:#f0f1f3;color:#5e6571;font-size:12px;line-height:1.25;font-weight:750}
.fms-process-step b{display:block;color:inherit;font-size:11px;margin-bottom:3px}
.fms-process-step.done{background:#edf4ef;color:#39714a}
.fms-process-step.active{background:var(--fms-blue);color:#fff;box-shadow:0 5px 12px rgba(67,103,198,.16)}

/* Main cards */
/* ★★ 결과가 나온 뒤에는 오른쪽 통을 넓힌다 (2026-08-21 · 사장님 지적) ─────
 *
 * 사장님: 「30초 보고인가 pdf 프린터 하는거 그쪽에 박스가 너무 우측으로 몰린건
 *          아닌가? 균형이 맞지 않아 보이는데」
 *
 * 맞는 말씀이었다. 1400px 화면에서 재어 보니 —
 *   결과 통이 x=738 에서 시작해 586px 밖에 안 됐다. 화면의 오른쪽 반쪽이다.
 *   그 안에서 문서 칸(임원 30초 보고 · 산업재해조사표 …)이 233px 씩 둘로 쪼개졌다.
 *   왼쪽 절반에는 이미 다 쓴 입력칸이 그대로 자리를 차지하고 있었다.
 *
 * ★ 고칠 것은 이미 있었다. site.css 86줄에 이렇게 적혀 있다 —
 *     .accident-intake-shell.has-result{grid-template-columns:minmax(300px,340px) minmax(0,1fr)}
 *   결과가 나오면 왼쪽을 340px 로 줄이고 나머지를 결과에 주는 규칙이다.
 *   그런데 아래 한 줄이 **!important 로 덮어써서** 그 규칙이 한 번도 살지 못했다.
 *
 * ★★ 위험성평가 단추줄(.btnrow) 때와 **똑같은 꼴**이다.
 *   나중에 온 !important 가 앞서 고쳐 둔 것을 조용히 죽인다.
 *   그래서 여기서는 :not(.has-result) 로 **자리를 나눈다** —
 *   한 상태에 규칙이 하나만 걸리게. 그래야 다음에 또 안 죽는다.
 * ────────────────────────────────────────────────────────────────────── */
.accident-intake-shell{gap:14px!important;margin:14px 14px 44px!important}
.accident-intake-shell:not(.has-result){grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr)!important}
.accident-intake-shell.has-result{grid-template-columns:minmax(300px,340px) minmax(0,1fr)!important;gap:22px!important}
.accident-intake-main,.incident-side>section,.incident-side>.rapid-resultbox{background:#fff!important;border:1px solid #e6e8ec!important;border-radius:20px!important;box-shadow:0 10px 26px rgba(28,34,45,.055)!important}
.accident-intake-main{padding:26px!important}
.incident-side{gap:12px!important;top:12px!important}
.intake-top h2{font-size:30px!important;line-height:1.18!important;letter-spacing:-.04em!important;margin:7px 0 9px!important}
.intake-top>p{font-size:13px!important;color:#737a86!important;line-height:1.65!important}
.rapid-eyebrow,.rapid-kicker,.mode-head>span,.live-summary-head span,.document-board-head span,.doc-inspector-head small{color:var(--fms-blue)!important}
.engine-line{margin-top:10px}

.intake-methods{margin:18px 0 16px!important;gap:8px!important}
.intake-methods button{min-height:128px!important;border-radius:15px!important;background:#fafbfc!important;border:1px solid #e0e4ea!important;padding:34px 14px 14px!important;box-shadow:none!important}
.intake-methods button:hover,.intake-methods button.active{transform:none!important;border-color:#6d88cf!important;background:#f7f9ff!important;box-shadow:0 0 0 2px rgba(67,103,198,.06)!important}
.intake-methods button.urgent-method:hover,.intake-methods button.urgent-method.active{border-color:#dc7772!important;background:#fff8f7!important}
.intake-methods b{font-size:16px!important}
.method-badge{background:#edf2fb!important;color:#4367c6!important;border-radius:8px!important}
.urgent-method .method-badge{background:#fff0ef!important;color:#b43d38!important}

/* Inputs: same blue focus ring as FMS operational pages */
.company-smart-card{border-radius:17px!important;border-color:#e1e5eb!important;padding:20px!important}
.company-smart-card select,.company-smart-card input,.paste-narrative,.guide-answer textarea,.leave-inline input{border-color:#d7dde7!important;border-radius:13px!important;background:#fff!important}
.company-smart-card select:focus,.company-smart-card input:focus,.paste-narrative:focus,.guide-answer textarea:focus,.leave-inline input:focus{border-color:#5d7bcf!important;box-shadow:0 0 0 3px rgba(67,103,198,.10)!important}
.site-auto-info,.employee-auto-info{background:#f4f5f7!important;border-radius:13px!important}
.auto-connected em{background:#eaf7ef!important;color:#34774c!important}
.site-risk-badges span{border-color:#dfe4eb!important}
.site-risk-badges span b{color:#4367c6!important}

/* Progress colors */
.guide-progress{color:var(--fms-blue)!important}
.guide-progress div{height:6px!important;background:#e8ebf0!important}
.guide-progress i,.doc-progress i{background:var(--fms-blue)!important}
.time-unknown input{accent-color:var(--fms-blue)!important}
.guide-actions .primary,.doc-field-list article aside button,.copy-report{background:#3f63c5!important}
.guide-actions .secondary{border-color:#d6dce6!important}
.report-tabs button.active{background:#4367c6!important;border-color:#4367c6!important}

/* Legal/safety notes */
.fms-legal-note,.legal-lock{border:1px solid #ead9da!important;border-left:4px solid var(--fms-red)!important;background:#fff9f9!important;border-radius:12px!important;color:#4a4f59!important;box-shadow:none!important;margin:12px 14px!important}
.fms-legal-note strong{color:#a92f2b!important}
.intake-lock{font-size:12px!important}

/* Result/workflow cards */
.deep-section,.document-board,.intelligence-lens{border-radius:17px!important;border-color:#e2e6ec!important;box-shadow:none!important}
.current-action,.smart-progress .progress-items .now{border-color:#e3b8b6!important;background:#fff9f8!important}
.smart-progress .progress-items .now .progress-state-dot{background:var(--fms-red)!important}
.smart-progress .progress-items .done .progress-state-dot{background:var(--fms-green)!important}
.smart-progress .progress-items .next .progress-state-dot{background:var(--fms-blue)!important}
.later-step>b,.process-lane.employer .lane-head span,.doc-impact b{color:var(--fms-blue)!important}
.document-card:hover{border-color:#6d88cf!important}
.document-card small{color:#4367c6!important}
.doc-impact{background:#edf2fb!important;color:#4e5f88!important}

.tool-info{margin:0 14px 24px!important;padding:24px 26px!important;background:#fff;border:1px solid #e3e6ea;border-radius:18px}
.tool-info h2{font-size:24px!important;margin:5px 0!important}
.tool-info p{margin:9px 0 0!important;font-size:13px!important}
.foot{width:min(1418px,calc(100% - 48px));padding:24px 0 42px!important;border-top:1px solid #dfe3e8!important;color:#7b818c!important}

/* Remove standalone-product visual language */
.toolhero,.backlink{display:none!important}
.fms-accident-chip{border-color:#d7e1f3!important;background:#f8faff!important;color:#4367c6!important}
.fms-accident-chip:before{background:#4367c6!important}

@media(max-width:1180px){
  .nav.fms-nav{margin-left:20px;overflow-x:auto;max-width:calc(100vw - 310px)}
  .nav.fms-nav a{padding:10px 9px;font-size:12px}
  .fms-process-rail{grid-template-columns:repeat(4,1fr)}
  .accident-intake-shell{grid-template-columns:1fr!important}
  .incident-side{position:static!important}
}
@media(max-width:760px){
  .wrap{width:min(100% - 22px,1418px)}
  .fms-header-band .wrap{width:calc(100% - 20px)}
  .nav.fms-nav{margin-left:auto;max-width:none}
  .nav.fms-nav a:not(.active){display:none}
  /* ★★★ 휴대폰에서 로그인 딱지를 숨기던 것을 되살린다 (2026-08-22)
   *
   * 사장님: 「로그인했는데도 상단에 로그인 표시도 없을뿐만아니라」
   *         「그리고 다시 로그인 하래」
   *
   * 숨겨 두니 두 가지가 함께 망가졌다 —
   *   ① 들어와 있는지 **알 길이 없다**
   *   ② 안내의 「로그인하기」 를 눌러도 숨은 단추를 누르는 셈이라
   *      아무 일도 안 일어난다. 그래서 계속 「다시 로그인 하라」 만 뜬다.
   *
   * ★ 이제는 좁아지면 딱지가 스스로 줄고 긴 이름은 … 로 잘린다
   *   (shared/shell.css). 숨길 까닭이 없어졌다. */
  .fms-login{display:inline-flex}
  .fms-page-banner{margin-top:14px;padding:22px 18px;align-items:flex-start;flex-direction:column}
  .fms-page-title{align-items:flex-start}
  .fms-page-icon{width:52px;height:52px;flex-basis:52px;border-radius:15px}
  .fms-page-copy h1{font-size:25px}
  .fms-page-actions{width:100%;justify-content:flex-start}
  .fms-process-rail{grid-template-columns:repeat(2,1fr);margin-inline:0}
  .accident-intake-shell{margin-inline:0!important}
  .fms-legal-note,.legal-lock{margin-inline:0!important}
  .tool-info{margin-inline:0!important}
  .intake-methods{grid-template-columns:1fr!important}
  .accident-intake-main{padding:20px!important}
}

/* v3.2.1 — existing FMSAFEAI operational-page progress card sync */
.fms-progress-card{display:flex;align-items:center;gap:24px;margin:0 14px 14px;padding:20px 18px;background:#fff;border:1px solid #e5e7eb;border-radius:17px;box-shadow:0 7px 18px rgba(23,28,38,.04)}
.fms-progress-main{min-width:0;flex:1}
.fms-progress-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.fms-progress-title strong{font-size:21px;line-height:1.2;letter-spacing:-.035em;color:#111827}
.fms-progress-title span{font-size:12px;color:#7a818c}
.fms-progress-track{height:13px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.fms-progress-track i{display:block;height:100%;border-radius:inherit;background:var(--fms-green);transition:width .25s ease}
.fms-progress-meta{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:14px;color:#7a818c;font-size:12px}
.fms-progress-meta #fmsProgressNext{color:#282d36;font-size:12px}
.fms-progress-meta #fmsProgressNext b{margin-right:5px;color:#111827}
.fms-progress-actions{display:flex;gap:8px;align-self:flex-end;padding-bottom:1px}
.fms-progress-btn{height:46px;padding:0 17px;border:1px solid #d4dae4;border-radius:12px;background:#fff;color:#4d64a2;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.fms-progress-btn:hover:not(:disabled){background:#f8faff;border-color:#b8c4df}
.fms-progress-btn:disabled{opacity:.42;cursor:not-allowed}
@media(max-width:760px){.fms-progress-card{margin-inline:0;align-items:stretch;flex-direction:column;padding:18px}.fms-progress-actions{align-self:stretch}.fms-progress-btn{flex:1}.fms-progress-meta{align-items:flex-start;flex-direction:column}}


/* v3.2.5 UI FINAL integration overrides */
.company-v325{border-color:#e1e5eb!important}.company-count-chip{border-color:#dfe4eb!important;background:#f5f7fa!important;color:#657083!important}
.site-search-results{border-color:#d5dce8!important;box-shadow:0 18px 44px rgba(27,37,56,.14)!important}.site-search-result:hover,.site-search-result:focus{background:#f3f6fc!important}.site-search-result i{color:#4367c6!important;background:#edf2fb!important}
.text-action b{color:#4367c6!important}.connection-card.connected{border-color:#d8e7dd!important;background:#f8fcf9!important}.connection-card.manual{border-color:#d9e1f3!important;background:#f8faff!important}.connection-card.manual .connection-title em{color:#4367c6!important;background:#eaf0fb!important}
.inline-manual-panel{border-color:#d9dee8!important;background:#fafbfc!important}.company-flow-note span{color:#4367c6!important;background:#fff!important}.next-flow-note{border-color:#d9e2f4!important;background:#f7f9fd!important}.next-flow-note b{color:#4367c6!important}
.executive-v325.pending{border-color:#ccd8f0!important;background:#f7f9fd!important}.executive-v325 .executive-progress i{background:#4367c6!important}.executive-v325.ready .executive-progress i{background:#3f7b48!important}.executive-v325 p strong{color:#405c9e!important}

/* v3.2.7 FMSAFEAI MOBILE SHELL FINAL */
@media(max-width:900px){
  .fms-header-band{position:relative;z-index:40}
  .topbar{gap:10px!important}
  .nav.fms-nav{margin-left:auto!important;margin-right:0!important;max-width:none!important;overflow:visible!important}
  /* ★★ 여기서 접기를 끄고 있었다 (2026-08-21 · 사장님 지적) ─────────────
     사장님: 「알약버튼이 벗어나 있어」  「왜 그렇게 해야지?」

     위(148·163줄)에 좁은 화면에서 **넉 칸 → 두 칸으로 접는** 규칙이 이미 있었다.
     그런데 이 한 줄이 display:flex!important 로 그것을 죽이고
     여덟 칸을 한 줄로 펴 옆으로 밀게 만들었다.
     재어 보니 줄 속이 888px 인데 휴대폰 창은 332px — 1·2·3단계만 보였다.

     ★ 이 줄이 하는 일은 「내가 몇 단계까지 왔나」 를 한눈에 보여 주는 것이다.
       다섯 단계가 숨어 있으면 그 일을 못 한다.
       손가락으로 쓸어야 보이는 것은 없는 것과 비슷하다.
     ★★ 위험성평가 .btnrow · 사고대응 .has-result 때와 **똑같은 꼴**이다 —
       나중에 온 !important 가 앞서 고쳐 둔 것을 조용히 죽인다.
     → 접기를 살린다. 밀 일이 없으니 넘침도 안 쓴다.
     ────────────────────────────────────────────────────────────── */
  .fms-process-rail{overflow-x:visible;overflow-y:visible;gap:7px;margin:0 0 12px!important;padding:7px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;border-radius:14px}
  .fms-process-rail::-webkit-scrollbar{display:none}
  /* 칸 폭은 격자가 정한다 — 118px 로 못 박으면 접혀도 삐져나온다 */
  .fms-process-step{min-width:0;min-height:52px;padding:7px 6px;white-space:normal;text-align:center;line-height:1.3}
  .fms-progress-card{margin-inline:0!important}
  .fms-legal-note,.legal-lock{margin-inline:0!important}
  .accident-intake-shell{margin-inline:0!important}
  .tool-info{margin-inline:0!important}
}
@media(max-width:760px){
  /* ★ 껍데기(shell)가 이미 여백을 준다 — 여기서 또 주면 두 번 들어가
       위 머리칸과 줄이 안 맞아 오른쪽으로 밀린 것처럼 보인다 (2026-08-22).
       사장님: 「우측으로 밀리지」 */
  .wrap{width:100%!important}
  .fms-header-band .wrap{width:calc(100% - 16px)!important}
  .topbar{height:60px!important}
  .fms-brand{font-size:15px!important}
  .fms-brand-mark{width:20px;height:20px;margin-right:3px}.fms-brand-mark svg{width:20px;height:20px}
  .nav.fms-nav a:not(.active){display:none!important}.nav.fms-nav a.active{min-height:40px;padding:9px 10px!important;font-size:12px!important}
  .fms-login{display:inline-flex!important}   /* ★ 아래 설명 참고 — 숨기지 않는다 */
  .fms-page-banner{margin:12px 0 14px!important;padding:18px 15px!important;min-height:auto!important;border-radius:17px!important;align-items:stretch!important;flex-direction:column!important;gap:14px!important}
  .fms-page-title{align-items:flex-start!important;gap:12px!important}
  .fms-page-icon{width:44px!important;height:44px!important;flex:0 0 44px!important;border-radius:13px!important}.fms-page-icon svg{width:24px!important;height:24px!important}
  .fms-page-copy h1{font-size:23px!important;margin-bottom:7px!important}.fms-page-copy p{font-size:12px!important;line-height:1.55!important}
  .fms-page-actions{width:100%!important;justify-content:flex-start!important;gap:7px!important}.fms-back-btn,.fms-storage-chip{min-height:40px!important;padding:0 11px!important}.fms-storage-chip{white-space:normal!important;line-height:1.35!important}
  .fms-process-step{flex-basis:110px;font-size:11px}
  .fms-progress-card{align-items:stretch!important;flex-direction:column!important;padding:15px!important;border-radius:15px!important;gap:13px!important}
  .fms-progress-title strong{font-size:19px!important}.fms-progress-track{height:10px!important}.fms-progress-meta{align-items:flex-start!important;flex-direction:column!important;gap:6px!important;margin-top:10px!important}.fms-progress-actions{align-self:stretch!important}.fms-progress-btn{flex:1;min-height:44px!important;padding:0 10px!important}
  .fms-legal-note,.legal-lock{padding:11px 12px!important;border-radius:11px!important;font-size:11.5px!important}
  .accident-intake-main{padding:15px!important;border-radius:17px!important}.incident-side>section,.incident-side>.rapid-resultbox{border-radius:17px!important}
  .intake-top h2{font-size:25px!important}.intake-top>p{font-size:12.5px!important}
  .tool-info{padding:17px 15px!important;border-radius:15px!important}.tool-info h2{font-size:22px!important}.tool-info p{font-size:12px!important}
  .foot{width:calc(100% - 18px)!important;padding-bottom:calc(30px + env(safe-area-inset-bottom))!important;line-height:1.6}
}
@media(max-width:430px){
  /* ★ 여기서 또 여백을 주면 세 겹이 된다 — 껍데기 12px 만 남긴다 (2026-08-22) */
  .wrap{width:100%!important}.fms-header-band .wrap{width:calc(100% - 12px)!important}
  .fms-page-title{display:grid!important;grid-template-columns:40px 1fr!important}.fms-page-icon{width:40px!important;height:40px!important;flex-basis:40px!important}.fms-page-copy h1{font-size:21px!important}
  .fms-page-actions{display:grid!important;grid-template-columns:auto 1fr!important}.fms-storage-chip{justify-content:flex-start!important}
  .fms-process-step{flex-basis:104px;min-height:50px}
  .fms-progress-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
}

