/* Start-only UI. Load fonts/pretendard.css → tokens.css → start.css. */
*,:before,:after { box-sizing: border-box; }
html { font-family: var(--font-sans); background: var(--page-tint); color: var(--page-ink); scroll-padding-block: 24px; }
body { margin: 0; font-size: 1rem; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
button,input,select,textarea { font: inherit; }
a { color: var(--page-accent); text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
button,a,input,textarea,select,summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--page-accent); outline-offset: 4px; }
[hidden],.lm-print-only { display: none !important; }
img,svg { max-width: 100%; }
button { cursor: pointer; }
h1,h2,h3,h4,h5,p,dl { margin: 0 0 16px; }
h1,h2,h3,h4,h5 { line-height: 1.4; letter-spacing: -.025em; }
h4,h5 { font-size: 1.125rem; }
p:last-child { margin-bottom: 0; }
.start-wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.start-header { background: var(--page-paper); border-bottom: 1px solid var(--page-rule); }
.start-header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.start-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--page-ink); text-decoration: none; }
.start-brand img { width: 40px; height: 40px; }
.start-brand-name { display: grid; line-height: 1.4; }
.start-brand-name strong { font-size: 1.125rem; }
.start-brand-name span { color: var(--page-muted); font-size: .875rem; }
.start-nav { display: flex; align-items: center; gap: 12px; }
.start-nav a,.start-theme { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; font-size: .875rem; }
.start-nav a { color: var(--page-muted); }
.start-theme { border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--page-paper); color: var(--page-ink); gap: 6px; }
.start-theme svg { width: 18px; height: 18px; }
.start-skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 12px 20px; background: var(--page-paper); }
.start-skip:focus { top: 12px; }
.start-main { min-height: 55vh; padding-block: 64px 80px; }
.start-intro { margin-bottom: 40px; }
.start-eyebrow { font-size: .875rem; font-weight: 700; color: var(--page-accent); margin-bottom: 16px; letter-spacing: .025em; }
.start-intro h1 { font-size: clamp(2rem, 3.4vw, 2.875rem); line-height: 1.28; letter-spacing: -.045em; font-weight: 800; margin-bottom: 20px; }
.start-intro .lm-lead { font-size: 1.125rem; }
.start-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.start-choices h2 { font-size: 1.375rem; margin-bottom: 8px; }
.start-choices .lm-case-steps { margin-block: 20px 24px; }
.start-domains { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.start-domains .lm-tile { padding: 16px; min-height: 92px; font-size: 1rem; gap: 12px; }
.start-domains .lm-visual-icon { width: 32px; height: 32px; flex-basis: 32px; background: none; }
.start-domains .lm-visual-icon svg { width: 26px; height: 26px; }
.start-privacy { margin-top: 24px; font-size: .9375rem; color: var(--page-muted); }
.start-preview { background: var(--page-paper); border: 1px solid var(--border); border-top: 3px solid var(--page-accent); padding: 30px; border-radius: 2px 2px var(--radius-xl) var(--radius-xl); box-shadow: var(--shadow-e2); }
.start-preview-label { font-size: .875rem; color: var(--page-muted); margin-bottom: 8px; }
.start-preview h2 { font-size: 1.5rem; margin-bottom: 12px; }
.start-preview > p { color: var(--page-muted); font-size: .9375rem; }
.start-preview dl { margin: 28px 0 0; }
.start-preview dt { font-size: 1rem; font-weight: 700; border-top: 1px solid var(--page-rule); padding-top: 20px; }
.start-preview dd { color: var(--page-muted); font-size: .9375rem; margin: 8px 0 24px; }
.start-preview dd:last-child { margin-bottom: 0; }
.start-preview-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--page-rule); }
.start-footer { border-top: 1px solid var(--border); background: var(--page-paper); padding-block: 32px; color: var(--page-muted); font-size: .875rem; }
.start-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.start-footer-top strong { color: var(--page-ink); font-size: 1rem; }
.start-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.start-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.start-footer details { margin-bottom: 20px; max-width: 760px; }
.start-footer summary { min-height: 44px; padding-block: 10px; cursor: pointer; color: var(--page-accent); }
.start-footer small { display: block; font-size: .875rem; margin-top: 12px; }
/* Existing PHP roots and output hooks. No dependency on lawmadi-ui.css. */
.lm-ui,.lm-sv { min-width: 0; color: var(--page-ink); font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.8; }
.lm-case { max-width: 960px; margin-inline: auto; }
.lm-note { min-width: 0; }
.lm-ui--bare { padding: 0; margin: 0; }
.lm-title { font-size: clamp(1.875rem, 3.4vw, 2.625rem); line-height: 1.3; font-weight: 800; }
.lm-lead,.lm-muted,.muted { color: var(--page-muted); }
.lm-lead { max-width: 65ch; font-size: 1.125rem; }
.lm-section { font-size: 1.375rem; margin-block: 32px 16px; }
.lm-card,.card { padding: 28px; margin-block: 24px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--page-paper); }
.lm-card > .lm-section:first-child { margin-top: 0; }
.lm-notice,.notice { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--page-tint); }
.lm-q,.q { display: block; font-size: 1.125rem; font-weight: 700; margin-bottom: 12px; }
.lm-case-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 32px; padding: 0; list-style: none; }
.lm-case-steps li { display: flex; flex: 1 1 100px; align-items: center; gap: 8px; padding: 10px 8px; border-bottom: 2px solid var(--border); color: var(--page-muted); font-size: .9375rem; }
.lm-step-number { display: inline-flex; flex: 0 0 26px; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--page-paper); font-size: .875rem; }
.lm-case-steps [aria-current="step"] { color: var(--page-accent); border-color: var(--page-accent); font-weight: 700; }
.lm-case-steps [aria-current="step"] .lm-step-number { background: var(--primary); color: var(--on-primary); }
.lm-tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 20px 32px; }
.lm-tile,.lm-tiles > button { display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 104px; padding: 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-xl); background: var(--page-paper); color: var(--page-ink); font-weight: 600; text-decoration: none; line-height: 1.55; }
.lm-tile-copy,.lm-search-hit-copy { display: grid; min-width: 0; gap: 4px; }
.lm-tile-copy small,.lm-search-hit-domain { font-size: .9375rem; color: var(--page-muted); font-weight: 400; }
.lm-visual-icon { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--page-accent); background: var(--page-tint); border-radius: var(--radius-md); }
.lm-visual-icon svg { width: 26px; height: 26px; }
/* Decorative arrows are omitted; the full tile remains the link. */
.lm-tile-arrow,.lm-search-hit-arrow { display: none; }
.lm-ui :is(a:not(.lm-tile):not(.lm-btn)) { display: inline-flex; align-items: center; min-height: 44px; }
.lm-ui :is(button,.lm-btn),.lm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 44px; max-width: 100%; padding: 11px 20px; border: 1px solid var(--primary); border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700; line-height: 1.6; text-decoration: none; text-align: center; }
.lm-ui .lm-btn--ghost,.lm-btn--ghost { background: var(--page-paper); color: var(--page-accent); border-color: var(--border-strong); }
.lm-ui :is(button,input,textarea,select):disabled { cursor: not-allowed; border-style: dashed; background: var(--page-tint); color: var(--page-muted); }
.lm-ui :is([aria-pressed="true"],.is-active),.lm-filter [aria-current="page"] { background: var(--primary-light); color: var(--page-accent); border-color: var(--page-accent); box-shadow: inset 0 0 0 1px var(--page-accent); }
.lm-ui :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,textarea),.lm-textarea { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid var(--page-muted); border-radius: var(--radius-md); background: var(--page-paper); color: var(--page-ink); }
.lm-ui textarea { display: block; min-height: 140px; resize: vertical; margin-bottom: 16px; }
.lm-ui :is(input,textarea)::placeholder { color: var(--page-muted); opacity: 1; }
.lm-ui :is(input[type="checkbox"],input[type="radio"]) { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--primary); }
.lm-choice,.lm-share-consent > label { display: flex; align-items: flex-start; min-height: 48px; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.lm-error,.err { padding: 16px; border-left: 4px solid var(--danger); background: var(--danger-bg); color: var(--danger); }
.lm-req,.req { color: var(--danger); }
.lm-ui [aria-invalid="true"] { border-color: var(--danger); }
.lm-search { background: var(--page-paper); }
.lm-search-prompt { font-weight: 700; margin-block: 24px 12px; }
.lm-search-hits { list-style: none; padding: 0; display: grid; gap: 12px; }
.lm-search-hits .lm-tile { min-height: 64px; }
.lm-search-result:empty,.lm-search-prompt:empty,.lm-search-hits:empty,.lm-copy-status:empty { display: none; }
.lm-case-sheet { margin-block: 32px; padding: 36px; background: var(--page-paper); border: 1px solid var(--border); border-top: 3px solid var(--page-accent); border-radius: 2px 2px var(--radius-xl) var(--radius-xl); box-shadow: var(--shadow-e1); }
.lm-case-sheet .lm-card { border: 0; border-bottom: 1px solid var(--page-rule); border-radius: 0; padding: 0 0 28px; margin: 0 0 28px; }
.lm-case-sheet .lm-card:last-child { border: 0; padding-bottom: 0; margin-bottom: 0; }
.lm-case-sheet .lm-section { margin-top: 0; }
.lm-case-sheet h4 { margin-top: 24px; }
.lm-report-head dl,.lm-notice dl { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 8px 20px; }
.lm-report-head dt,.lm-notice dt { color: var(--page-muted); font-weight: 500; }
.lm-report-head dd,.lm-notice dd { margin: 0; font-weight: 600; }
.lm-empathy { color: var(--page-ink); }
.lm-empathy-recap { border-bottom: 1px solid var(--page-rule); padding-bottom: 16px; }
.lm-empathy-next { font-weight: 600; }
.lm-case-bridge { color: var(--page-muted); margin-block: 20px; }
.lm-action-list { padding-left: 1.5em; }
.lm-action-list li { padding-left: .35em; margin-block: 10px; }
.lm-action-list li::marker { color: var(--page-accent); font-weight: 600; }
.lm-ui details { border: 1px solid var(--border); border-radius: var(--radius-md); margin-block: 12px; overflow: clip; }
.lm-ui summary { min-height: 48px; padding: 12px 16px; color: var(--page-accent); font-weight: 600; cursor: pointer; }
.lm-ui details > .lm-muted { padding: 16px; font-size: .9375rem; margin: 0; border-top: 1px solid var(--border); }
.lm-law { padding: 20px; background: var(--page-tint); border-top: 1px solid var(--border); white-space: pre-wrap; line-height: 1.9; }
.lm-case-source { font-size: .9375rem; }
.lm-related-posts ul { list-style: none; padding: 0; margin: 0; }
.lm-related-posts li + li { border-top: 1px solid var(--page-rule); }
.lm-related-posts a { padding-block: 12px; }
.lm-note-actions { margin-top: 28px; }
.lm-case-choices,.lm-copy-area { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px; }
.lm-copy-fallback,.lm-copy-status { width: 100%; margin: 0; }
.lm-copy-fallback input { display: block; }
.lm-share-consent { margin-top: 24px; }
/* Advertisements remain distinct, subordinate, and explicitly labelled in HTML. */
.lm-lawyers { background: var(--page-tint); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; margin-block: 40px; }
.lm-lawyers > .lm-muted:first-child { display: table; border: 1px solid var(--page-muted); border-radius: 4px; padding: 2px 10px; font-size: .9375rem; font-weight: 600; }
.lm-lawyers > .lm-section { margin-top: 0; }
.lm-lawyer-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.lm-lawyer { margin: 0; }
.lm-dist,.lm-order { display: block; color: var(--page-muted); font-size: .9375rem; }
.lm-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-block: 24px; }
.lm-filter > label { flex: 1 1 180px; min-width: 0; font-size: 1rem; }
.lm-filter select { display: block; margin-top: 8px; }
.lm-directory-empty { display: flex; gap: 20px; padding: 28px; margin-block: 28px; background: var(--page-paper); border: 1px dashed var(--border-strong); border-radius: var(--radius-xl); }
.lm-directory-empty h4 { font-size: 1.25rem; }
.lm-ad-guide { margin-top: 32px; }
.lm-principle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.lm-principle-grid article { border-top: 1px solid var(--border-strong); padding-top: 20px; }
.lm-principle-grid h5 { margin-block: 16px 12px; }
.lm-principle-grid p,.lm-selection-guide p { font-size: 1rem; color: var(--page-muted); }
.lm-selection-guide { margin-top: 28px; }
.start-preview-notice { font-size: .9375rem; padding: 16px; border: 1px dashed var(--border-strong); margin-bottom: 28px; color: var(--page-muted); }
@media (hover:hover) {
  .lm-tile:hover,.lm-tiles > button:enabled:hover { background: var(--primary-light); border-color: var(--page-accent); color: var(--page-accent); }
  .lm-ui :is(button:enabled,.lm-btn):hover,.start-theme:hover { background: var(--primary-dark); color: var(--on-primary); }
}
@media (max-width: 800px) {
  .start-wrap { width: calc(100% - 40px); }
  .start-layout { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .start-main { padding-block: 36px 48px; }
  .start-preview { max-width: none; }
  .lm-principle-grid { grid-template-columns: minmax(0,1fr); }
  .lm-case-sheet { padding: 24px; }
}
@media (max-width: 540px) {
  .start-wrap { width: calc(100% - 32px); }
  .start-header-inner { min-height: 76px; gap: 8px; }
  .start-brand { gap: 8px; }
  .start-brand img { width: 32px; height: 32px; }
  .start-brand-name strong { font-size: 1rem; }
  .start-nav { gap: 4px; }
  .start-nav a,.start-theme { padding-inline: 8px; }
  .start-theme svg { display: none; }
  .start-intro { margin-bottom: 28px; }
  .start-intro h1 { font-size: 2rem; }
  .start-intro .lm-lead { font-size: 1rem; }
  .start-domains { gap: 8px; }
  .start-domains .lm-tile { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 122px; padding: 14px; gap: 10px; }
  .start-preview { padding: 24px; }
  .start-footer-top { align-items: flex-start; flex-direction: column; gap: 8px; }
  .lm-tiles,.lm-lawyer-list { grid-template-columns: minmax(0,1fr); }
  .lm-case-steps { gap: 4px; }
  .lm-case-steps li { flex-basis: 90px; gap: 6px; padding-inline: 4px; }
  .lm-card,.lm-lawyers { padding: 20px; }
  .lm-case-sheet { padding: 22px 18px; }
  .lm-report-head dl { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .lm-report-head dd { margin-bottom: 12px; }
  .lm-directory-empty { flex-direction: column; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@page { size: A4; margin: 16mm; }
@media print {
  :root { color-scheme: light; --page-paper: #fff; --page-tint: #fff; --page-ink: #191f28; --page-muted: #4e5968; --page-accent: #2d4d7a; --border: #999; --page-rule: #999; }
  html,body { background: #fff !important; color: #191f28 !important; font-size: 11pt; line-height: 1.5; }
  .start-header,.start-footer,.start-skip,.start-preview-notice,.lm-no-print,.lm-note-actions,.lm-lawyers,.lm-related-posts,.lm-case-steps,.lm-search,.lm-tiles,.lm-filter,button,.lm-btn { display: none !important; }
  .lm-print-only { display: block !important; }
  .start-main,.start-wrap,.lm-case { width: 100%; max-width: none; margin: 0; padding: 0; }
  .lm-ui { font-size: 11pt; line-height: 1.5; }
  .lm-title { font-size: 21pt; margin-bottom: 16pt; }
  .lm-section { font-size: 14pt; }
  .lm-case-sheet { border: 0; box-shadow: none; padding: 0; margin: 12pt 0; }
  .lm-case-sheet .lm-card { padding: 0 0 12pt; margin: 0 0 12pt; }
  .lm-card { box-shadow: none; }
  .lm-action-list li { break-inside: avoid; margin-block: 5pt; }
  h2,h3,h4,dt { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .lm-report-head dl { display: grid; grid-template-columns: 70pt minmax(0,1fr); }
  .lm-case-laws details { border: 0; margin: 3pt 0; }
  .lm-case-laws summary { min-height: 0; padding: 2pt 0; }
  .lm-case-laws details > :not(summary) { display: none !important; }
  .lm-case-source,.lm-print-only { font-size: 9pt; }
  .lm-ui a { min-height: 0 !important; color: #2d4d7a; }
}
