/* Moneyflow: a quiet, personal workspace for ideas and recurring work. */
:root,
:root[data-theme="dark"] {
  --bg: #121b16;
  --surface: #1b2820;
  --raised: #26372b;
  --input: #17231c;
  --line: #35473a;
  --line-soft: #2a3c30;
  --ink: #edf3e9;
  --muted: #a7b7a6;
  --quiet: #8b9e8e;
  --accent: #bcdfa0;
  --primary: #bbdba1;
  --primary-hover: #d0e9bc;
  --green: #b4d79c;
  --amber: #e4bd84;
  --red: #e5a8a1;
  --mf-on-primary: #1c3121;
  --mf-mint: #293e2b;
  --mf-green-soft: #293f2e;
  --mf-amber-soft: #423728;
  --mf-red-soft: #432e29;
  --mf-sidebar: #101c16;
  --mf-shadow: 0 10px 35px #00000018;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --raised: #f0f3eb;
  --input: #fafbf8;
  --line: #dfe5db;
  --line-soft: #e9ede5;
  --ink: #25332a;
  --muted: #6c796d;
  --quiet: #7e8b7e;
  --accent: #3e6543;
  --primary: #2d5139;
  --primary-hover: #1d3c29;
  --green: #416b45;
  --amber: #9b702e;
  --red: #ac574c;
  --mf-on-primary: #ffffff;
  --mf-mint: #edf2e5;
  --mf-green-soft: #eaf3e6;
  --mf-amber-soft: #f7f0df;
  --mf-red-soft: #f9ece7;
  --mf-sidebar: #1c3026;
  --mf-shadow: 0 10px 35px #243a2410;
  color-scheme: light;
}
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --light-surface: var(--surface);
  --light-surface-inset: var(--bg);
  --light-surface-raised: var(--raised);
  --light-surface-accent: var(--mf-mint);
  --light-surface-green: var(--mf-green-soft);
  --light-surface-amber: var(--mf-amber-soft);
  --light-surface-red: var(--mf-red-soft);
  --light-highlight: var(--mf-mint);
  --light-border: var(--line);
  --light-border-strong: #8b9f82;
  --light-ink: var(--ink);
  --light-ink-muted: var(--muted);
  --light-ink-accent: var(--accent);
  --light-ink-green: var(--green);
  --light-ink-amber: var(--amber);
  --light-ink-red: var(--red);
  font-size: 14px;
}
html { scrollbar-gutter: stable; }
body { background: var(--bg); letter-spacing: -.15px; }
body, button, input, textarea, select { font-family: "Devflow Sans", "Malgun Gothic", sans-serif; }
h1, h2, h3 { color: var(--ink); }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 650; color: var(--quiet); }
.btn { border-radius: 9px; min-height: 40px; background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px #19301d04; }
.btn:hover { background: var(--raised); border-color: #97aa90; }
.btn.primary { min-height: 44px; color: var(--mf-on-primary); border-color: var(--primary); box-shadow: 0 3px 5px #23382012; font-weight: 600; }
.btn.soft { background: var(--mf-mint); color: var(--accent); border-color: transparent; }
.btn.small { min-height: 34px; }
.text-button { color: var(--accent); }
.badge { border-radius: 5px; font-weight: 550; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { border-radius: 9px; border-color: var(--line); background: var(--input); color: var(--ink); }
input:focus, textarea:focus, select:focus { border-color: #83a573; box-shadow: 0 0 0 3px #83a57316; }

/* A stable navigation rail; utilities stay in the top bar. */
.workspace-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 45; width: 224px; height: 100dvh; display: flex; flex-direction: column; padding: 34px 18px 22px; background: var(--mf-sidebar); color: #d6e3d4; border-right: 1px solid #ffffff05; }
.workspace-sidebar .brand { gap: 10px; padding: 0 9px; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 34px; border-radius: 9px; background: #d5ebb1; color: #29402b; flex: none; }
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.workspace-sidebar .brand-word { color: #f0f4e9; font-family: "Devflow Sans", sans-serif; font-size: 23px; font-weight: 750; letter-spacing: -1.15px; }
.brand-period { color: #c7df9f; }
.sidebar-section-label { margin: 51px 14px 13px; color: #829888; font-size: 9px; font-weight: 600; letter-spacing: 1.9px; }
.workspace-sidebar .workspace-nav { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; border: 0; overflow: visible; background: transparent; }
.workspace-sidebar .workspace-nav a { display: flex; gap: 12px; align-items: center; min-width: 0; min-height: 46px; padding: 12px 15px; border: 0; border-radius: 8px; color: #a9bdac; font-size: 13px; font-weight: 500; transition: background .18s, color .18s; }
.workspace-sidebar .workspace-nav a:hover { background: #ffffff07; color: #eff5e7; }
.workspace-sidebar .workspace-nav a.active { background: #344b35; color: #e1eec6; }
.workspace-sidebar .workspace-nav .icon { width: 18px; height: 18px; stroke-width: 1.6; }
.sidebar-bottom { margin-top: auto; padding: 30px 10px 0; }
.sidebar-note { border: 1px solid #70806a35; background: #ffffff03; padding: 18px 16px 16px; border-radius: 11px; margin-bottom: 24px; }
.sidebar-note > .icon { width: 23px; height: 23px; color: #c5d6a0; margin-bottom: 13px; }
.sidebar-note p { color: #d0decc; font-size: 13px; line-height: 1.9; }
.sidebar-note > span { display: block; font-size: 7px; letter-spacing: 1.5px; color: #7f9681; margin-top: 16px; }
.sidebar-connection { display: flex; align-items: center; gap: 8px; color: #b2c4ad; font-size: 11px; }
.connection-dot { width: 6px; height: 6px; border-radius: 50%; background: #c4a76f; flex: none; }
.sidebar-connection[data-connected="true"] .connection-dot { background: #b9d69b; box-shadow: 0 0 0 3px #b9d69b10; }
.sidebar-connection > .icon { width: 12px; height: 12px; margin-left: auto; color: #738e79; }
.sidebar-private { display: flex; gap: 7px; align-items: center; color: #718977; font-size: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #ffffff0a; }
.sidebar-private .icon { width: 12px; height: 12px; }
.app-main { min-width: 0; min-height: 100vh; margin-left: 224px; }
.app-main .app-top { position: sticky; top: 0; z-index: 40; background: var(--surface); }
.app-main .topbar { min-height: 69px; height: 69px; padding: 0 36px; border-bottom: 1px solid var(--line-soft); gap: 16px; flex-wrap: nowrap; background: var(--surface); }
.topbar-leading { min-width: 0; display: flex; align-items: center; gap: 16px; font-size: 12px; white-space: nowrap; }
.topbar-kicker { color: var(--quiet); font-size: 9px; letter-spacing: 1.5px; }
.topbar-divider { color: var(--line); }
#breadcrumb-current { color: var(--ink); font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.app-main .topbar-actions { margin-left: auto; min-width: 0; max-width: none; gap: 7px; flex-wrap: nowrap; }
.app-main .topbar-actions > :is(.icon-button, .theme-toggle, .topbar-updates, .topbar-feedback),
.app-main .topbar-actions .service-account-button { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 33px; min-width: 33px; height: 33px; min-height: 33px; padding: 7px; margin: 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; }
.app-main .topbar-actions > :is(.icon-button, .theme-toggle, .topbar-updates, .topbar-feedback):hover,
.app-main .topbar-actions .service-account-button:hover { background: var(--raised); color: var(--ink); }
.app-main .topbar-actions > button > .icon { width: 17px; height: 17px; }
.app-main .topbar-actions > :is(.topbar-updates, .topbar-feedback, .theme-toggle) > span,
.app-main .service-account-button > span { display: none; }
.app-main .topbar-actions .mode-indicator { font-size: 10px; font-weight: 500; gap: 6px; padding: 5px 10px; background: var(--mf-mint); border-radius: 20px; color: var(--accent); white-space: nowrap; }
.app-main .mode-indicator i { background: #8ba56a; width: 5px; height: 5px; }
.app-main #service-account { order: 9; padding-left: 9px; margin-left: 3px; border-left: 1px solid var(--line-soft); }
.app-main .topbar-updates-dot { width: 5px; height: 5px; top: 4px; right: 5px; background: var(--green); box-shadow: 0 0 0 2px var(--surface); }
.app-main #page { width: min(1200px, 100%); max-width: 100%; padding: 35px 36px 22px; margin: 0 auto; }
.page-heading { align-items: center; gap: 20px; margin-bottom: 26px; }
.page-heading h1 { font-size: 27px; font-weight: 650; letter-spacing: -1px; margin-top: 5px; }
.page-heading p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 6px; }
.dashboard-heading { margin-bottom: 26px; }
.dashboard-heading h1 { font-size: 26px; }
.mf-date { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; align-self: flex-end; margin-bottom: 4px; }
.mf-date .icon { width: 14px; height: 14px; }

/* The opening panel explains the product without inventing business metrics. */
.mf-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; min-height: 288px; padding: 34px 38px; border: 1px solid #9dac8730; border-radius: 16px; background: var(--mf-mint); overflow: hidden; margin-bottom: 23px; }
.mf-hero-copy { position: relative; z-index: 1; }
.mf-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 8px; font-weight: 650; color: var(--muted); letter-spacing: 1.6px; }
.mf-eyebrow i { display: block; width: 5px; height: 5px; background: #829c5f; border-radius: 50%; }
.mf-hero h2 { font-size: clamp(28px, 2.9vw, 39px); line-height: 1.38; font-weight: 640; letter-spacing: -1.6px; margin-top: 12px; }
.mf-hero h2 > span { color: var(--accent); }
.mf-hero-copy > p { color: var(--muted); font-size: 12px; line-height: 1.85; margin-top: 13px; }
.mf-hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.mf-hero-actions .btn { padding: 11px 17px; font-size: 12px; }
.mf-quiet-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 550; }
.mf-quiet-link:hover { color: var(--accent); }
.mf-quiet-link .icon { width: 13px; height: 13px; }
.mf-flow-art { position: relative; width: 100%; max-width: 340px; min-height: 250px; margin: auto 0 auto auto; }
.mf-art-caption { position: absolute; top: 1px; right: 3px; font-size: 8px; font-weight: 550; color: #87967b; letter-spacing: 2px; }
.mf-art-orbit { position: absolute; width: 208px; height: 208px; border: 1px solid #8fa27735; border-radius: 50%; top: 26px; right: 16px; }
.mf-art-orbit::before { content: ""; position: absolute; inset: 22px; border: 1px dashed #8fa27730; border-radius: 50%; }
.mf-art-card { position: absolute; display: flex; align-items: center; gap: 12px; width: 244px; min-height: 65px; padding: 13px 16px; border-radius: 11px; background: var(--surface); border: 1px solid #9baa8628; box-shadow: 0 7px 20px #324a2910; }
.mf-art-research { top: 31px; right: 36px; transform: rotate(-3deg); }
.mf-art-design { top: 107px; right: 4px; transform: rotate(2deg); z-index: 1; }
.mf-art-run { top: 182px; right: 28px; transform: rotate(-2deg); background: #2e4a35; color: #e5eed9; border-color: #2e4a35; }
.mf-art-icon { width: 35px; height: 35px; display: grid; place-items: center; background: var(--mf-mint); border-radius: 9px; color: var(--accent); flex: none; }
.mf-art-icon > .icon { width: 18px; height: 18px; }
.mf-art-card small { display: block; color: var(--quiet); font-size: 7px; font-weight: 600; letter-spacing: 1.4px; }
.mf-art-card b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; margin-top: 4px; }
.mf-art-card > i { margin-left: auto; color: #98ad8a; }
.mf-art-card > i .icon { width: 13px; height: 13px; }
.mf-art-run .mf-art-icon { color: #d3e9ac; background: #456143; }
.mf-art-run small { color: #b3c79f; }
.mf-art-run b { color: #f1f5e9; }
.mf-art-card .mf-art-signal { width: 7px; height: 7px; border-radius: 50%; background: #c9e29b; box-shadow: 0 0 0 4px #c9e29b16; }
.mf-art-foot { position: absolute; right: 47px; bottom: -26px; color: var(--quiet); font-size: 9px; letter-spacing: .2px; }

.dashboard-stats { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 34px; }
.dashboard-stats .mf-stat { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 17px 20px 16px; box-shadow: 0 2px 3px #263a2102; min-width: 0; }
.mf-stat-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mf-stat-label > span:first-child { color: var(--muted); font-size: 11px; font-weight: 550; }
.mf-stat-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: var(--raised); flex: none; }
.mf-stat-icon .icon { width: 14px; height: 14px; }
.mf-stat-1 .mf-stat-icon { background: var(--mf-green-soft); }
.mf-stat-3 .mf-stat-icon { color: var(--amber); background: var(--mf-amber-soft); }
.dashboard-stats .mf-stat strong { display: flex; align-items: baseline; font-size: 29px; line-height: 1; letter-spacing: -1px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 14px; }
.dashboard-stats .mf-stat strong small { font-size: 11px; font-weight: 400; letter-spacing: 0; margin-left: 6px; color: var(--quiet); }
.mf-stat > p { font-size: 9px; color: var(--quiet); margin-top: 12px; line-height: 1.5; }
.dashboard-projects { min-width: 0; margin-top: 10px; }
.dashboard-projects .section-head { margin-bottom: 17px; }
.dashboard-projects h2 { font-size: 17px; font-weight: 650; }
.dashboard-projects .count { display: inline-grid; place-items: center; min-width: 22px; height: 21px; border-radius: 6px; background: var(--raised); color: var(--muted); font-size: 11px; margin-left: 7px; }
.collection-tools { gap: 10px; min-width: 0; }
.project-search { border-radius: 8px; background: var(--surface); min-width: 0; }
.project-search #project-filter { width: 169px !important; font-size: 11px !important; padding: 9px 10px !important; }
.layout-toggle { background: var(--surface); border-color: var(--line); border-radius: 8px; padding: 3px; }
.layout-toggle .icon-button { width: 29px; min-width: 29px; height: 28px; border-radius: 5px; color: var(--quiet); }
.layout-toggle .active { background: var(--mf-mint); color: var(--accent); }
.project-filters { gap: 3px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.project-filters button { min-height: 32px; padding: 6px 12px; border: 0; border-radius: 6px; font-size: 11px; color: var(--muted); }
.project-filters button.active { background: var(--mf-mint); color: var(--accent); font-weight: 600; border: 0; }
.projects-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.project-card { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 2px 5px #243a2103; transition: transform .18s, box-shadow .18s, border-color .18s; }
.project-card:hover { border-color: #9cae8d; box-shadow: var(--mf-shadow); transform: translateY(-2px); }
.project-card-top { gap: 10px; margin-bottom: 19px; }
.project-card-top .domain-icon { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--mf-mint); color: var(--accent); }
.project-domain { font-size: 11px; color: var(--muted); }
.project-card h3 { font-size: 17px; font-weight: 620; line-height: 1.6; margin-bottom: 9px; }
.project-card-body > p { min-height: 3.4em; color: var(--muted); font-size: 12px; line-height: 1.75; }
.project-state { gap: 9px; margin: 18px 0; }
.project-state > span:last-child:not(:first-child) { font-size: 10px; }
.project-card .badge { font-size: 10px; padding: 3px 7px; }
.project-card-progress, .project-card-progress small { font-size: 10px; }
.project-card > footer { margin-top: 18px; padding-top: 13px; font-size: 10px; gap: 8px; }
.project-card > footer a { font-size: 11px; }
.mf-card-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 10px; }
.mf-card-track { flex: 0 0 100%; display: flex; gap: 5px; }
.mf-card-track i { height: 4px; flex: 1; border-radius: 3px; background: var(--raised); }
.mf-card-track i.reached { background: #8da975; }
.mf-card-track i.current { background: var(--primary); }
.list-view .project-card { display: grid; grid-template-columns: 125px minmax(0,1fr) 110px 140px; gap: 16px; transform: none; }
.list-view .project-card .mf-card-steps { display: none; }
.list-view .project-card-top { margin-bottom: 0; }
.list-view .project-card-body > p { min-height: 0; }
.list-view .project-card > footer { margin: 0; padding: 0; border: 0; }
.collection-empty.mf-first-project { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 39px 24px 31px; }
.mf-first-project h3 { margin-top: 8px; font-size: 16px; font-weight: 600; }
.mf-first-project > p { color: var(--muted); font-size: 12px; max-width: 380px; line-height: 1.8; margin: 9px auto 20px; }
.mf-first-project > .btn { min-height: 39px; font-size: 11px; padding: 9px 16px; }
.mf-empty-art { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 0 auto 17px; height: 55px; }
.mf-empty-art > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); transform: rotate(-7deg); }
.mf-empty-art > span:last-child { transform: rotate(8deg); }
.mf-empty-art > span:nth-child(2) { background: var(--mf-mint); width: 52px; height: 52px; color: var(--accent); border-color: #99ae8428; transform: translateY(-5px); }
.mf-empty-art .icon { width: 20px; height: 20px; }
.mf-empty-caption { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--quiet); font-size: 9px; margin-top: 23px; }
.mf-empty-caption .icon { width: 10px; height: 10px; }
.home-focus { margin: 0 0 28px; padding: 19px 23px; border: 1px solid var(--line); border-left: 3px solid #99b579; border-radius: 11px; background: var(--surface); }
.home-focus h2 { font-size: 15px; }
.home-focus-label { color: var(--accent); font-size: 10px; }
.home-focus p { font-size: 11px; }
.home-focus .btn { font-size: 11px; min-height: 38px; }
.dashboard-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.dashboard-lower .dashboard-box { padding: 21px 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.dashboard-box .section-head h3 { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; }
.dashboard-box .section-head h3 .icon { width: 15px; height: 15px; color: var(--quiet); }
.dashboard-box .text-button { font-size: 10px; }
.dashboard-box .text-button .icon { width: 12px; height: 12px; }
.mf-quiet-empty { display: flex; align-items: flex-start; gap: 11px; padding: 23px 0 7px; }
.mf-quiet-empty > .icon { width: 16px; height: 16px; color: var(--quiet); margin-top: 2px; }
.mf-quiet-empty p { color: var(--muted); font-size: 11px; }
.mf-quiet-empty small { display: block; color: var(--quiet); font-size: 10px; margin-top: 4px; }
.next-item, .recent-event { padding-block: 13px; }
.recent-event b, .next-item b { font-size: 12px; }
.recent-event small, .next-item small, .recent-event time { font-size: 10px; }
.workspace-journey { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; border: 0; margin-top: 30px; padding: 15px 0; background: transparent; }
.workspace-journey > span { font-size: 8px; font-weight: 650; letter-spacing: 1.7px; color: var(--quiet); margin-right: 8px; }
.workspace-journey b { display: inline-flex; gap: 5px; align-items: center; font-size: 10px; color: var(--muted); font-weight: 500; }
.workspace-journey b i { color: var(--quiet); font-size: 8px; font-style: normal; font-variant-numeric: tabular-nums; }
.workspace-journey > .icon { width: 10px; height: 10px; color: var(--quiet); }
.app-footer { margin-top: 6px; border-top: 1px solid var(--line-soft); font-size: 10px; padding-top: 17px; color: var(--quiet); }
.app-footer .text-button { font-size: 10px; }

/* Keep the same system on the five-step project pages and utility screens. */
.project-heading { align-items: center; margin-bottom: 25px; }
.project-heading h1 { font-size: 25px; font-weight: 650; margin-top: 14px; }
.back-link { font-size: 11px; color: var(--muted); }
.save-status { font-size: 11px; }
.workflow-path { max-width: 100%; overflow-x: auto; padding-bottom: 5px; margin-bottom: 16px; }
.workflow-path .unified-stepper { grid-template-columns: repeat(5,minmax(117px,1fr)); gap: 8px; margin: 0; }
.workflow-path .unified-stepper > button { min-height: 76px; padding: 13px 12px; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
.workflow-path .unified-stepper > button.active { background: var(--mf-mint); border-color: #8faa77; }
.unified-stepper .step-no { width: 26px; height: 26px; font-size: 12px; border: 0; border-radius: 7px; background: var(--raised); color: var(--muted); }
.unified-stepper .active .step-no { background: var(--primary); color: var(--mf-on-primary); }
.unified-stepper .done .step-no { background: var(--mf-green-soft); color: var(--green); }
.unified-stepper .step-text b { font-size: 11px; }
.unified-stepper .step-text small { font-size: 9px; margin-top: 4px; }
.next-step-line { padding: 13px 17px; border-color: var(--line); border-radius: 9px; background: var(--surface); gap: 10px; margin-bottom: 24px; }
.next-step-line p, .next-step-line .badge { font-size: 11px; }
.next-step-where, .next-step-label { font-size: 10px; }
.settings-section, .settings-card, .stage-panel, .start-panel, .card { border-color: var(--line); border-radius: 12px; background: var(--surface); box-shadow: none; }
.card-header { border-color: var(--line-soft); }
.automation-prompt-header { justify-content: flex-start; flex-wrap: wrap; gap: 8px 12px; }
.stage-title { margin-bottom: 23px; }
.stage-title h2 { font-size: 23px; letter-spacing: -.7px; }
.stage-title p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.settings-layout { gap: 22px; }
.settings-row { border-color: var(--line-soft); }
.settings-section h3, .settings-card h3 { font-size: 13px; }
.settings-card .badge { font-size: 10px; }
.settings-row p, .settings-card .aside-caption { font-size: 11px; line-height: 1.8; }
.prompt-box { padding: 20px; background: var(--input); border: 1px solid var(--line-soft); border-radius: 10px; line-height: 1.9; font-size: 13px; }
.automation-trial-content { max-height: 32rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.data-table thead { background: var(--raised); }
.data-table th { color: var(--muted); font-size: 11px; font-weight: 600; }
.data-table td { font-size: 12px; border-color: var(--line-soft); }
.field-label { color: var(--ink); font-weight: 550; font-size: 12px; }
.field-label .optional, .field-hint { color: var(--quiet); font-size: 10px; }
.field-caption { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chat-context-actions { padding: 4px 16px 8px; }
.chat-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line-soft); }
.chat-modes .btn { justify-content: center; }
.chat-modes .btn[aria-pressed="true"] { background: var(--mf-green-soft); border-color: var(--line); color: var(--accent); }
.side-chat > .chat-attachment { padding: 5px 16px 8px; }
.chat-attachment .row { gap: 6px; }
.chat-attachment input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-attachment label.disabled { opacity: .55; pointer-events: none; }
.chat-attachment-preview { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.chat-attachment-preview img { width: 78px; height: 52px; object-fit: contain; border-radius: 4px; background: var(--input); }
.chat-attachment-preview span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-image-name { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.coding-log { gap: 14px; }
.coding-result, .coding-form, .coding-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.coding-result { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.coding-result p, .coding-form p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.coding-error { color: var(--red); }
.coding-details { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.coding-details summary { cursor: pointer; }
.coding-details p { margin-top: 6px; }
.coding-file { padding: 5px 0; overflow-wrap: anywhere; }
.coding-file span { color: var(--muted); }
.coding-file pre { max-width: 100%; max-height: 240px; overflow: auto; padding: 8px; background: var(--input); border-radius: 6px; font-size: 11px; }
.coding-form { padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); }
.coding-form textarea { resize: vertical; min-height: 62px; max-height: 140px; }
.coding-form .btn { align-self: flex-end; }
.coding-field { gap: 4px; color: var(--muted); }
.coding-field select { width: 100%; min-width: 0; }
.form-grid { gap: 18px; }
.initial-loading .loading-logo, .loading-logo { background: var(--mf-mint); color: var(--accent); }

/* Personal password gate: an introduction on the left, one quiet action on the right. */
body .service-personal-gate { padding: 44px; background: var(--bg); }
.service-personal-gate .mf-access-shell { width: min(1050px,100%); display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 25px 80px #263c2010; background: var(--surface); }
.mf-gate-story { min-height: 570px; padding: 43px 43px 30px; display: flex; flex-direction: column; position: relative; background: #243e2d; overflow: hidden; color: #eaf1e1; }
.mf-gate-story .brand { gap: 10px; position: relative; z-index: 1; }
.mf-gate-story .brand-word { font-family: "Devflow Sans",sans-serif; font-size: 26px; letter-spacing: -1.2px; font-weight: 700; color: #f0f4e8; }
.mf-gate-story .brand-mark { width: 31px; height: 33px; }
.mf-gate-story-copy { margin: auto 0; padding: 63px 0 48px; position: relative; z-index: 1; }
.mf-gate-story-copy > span { font-size: 8px; letter-spacing: 2px; color: #b7caa1; font-weight: 550; }
.mf-gate-story h2 { margin-top: 21px; font-size: 37px; line-height: 1.5; font-weight: 570; letter-spacing: -1.7px; color: #f2f5e8; }
.mf-gate-story h2 em { color: #d3e6ad; font-style: normal; }
.mf-gate-story-copy p { color: #afc0a7; font-size: 12px; line-height: 1.9; margin-top: 22px; }
.mf-gate-story-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; color: #9cb08e; font-size: 9px; }
.mf-gate-story-foot .icon { width: 12px; height: 12px; }
.mf-gate-drawing { position: absolute; right: -78px; bottom: 4px; width: 275px; height: 275px; border: 1px solid #c6dba620; border-radius: 50%; }
.mf-gate-drawing::before { content: ""; position: absolute; inset: 30px; border: 1px solid #c6dba620; border-radius: 50%; }
.mf-gate-drawing::after { content: ""; position: absolute; inset: 61px; border: 1px dashed #c6dba620; border-radius: 50%; }
.service-personal-gate .service-gate-panel { width: 100%; max-width: none; padding: 59px 49px 42px; margin: auto 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.service-personal-gate .service-gate-status { color: var(--muted); font-size: 8px; letter-spacing: 1.7px; }
.service-personal-gate .service-status-dot { background: #8fa56c; }
.service-personal-gate .mf-gate-lock { width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); background: var(--mf-mint); border-radius: 12px; margin-bottom: 26px; }
.mf-gate-lock .icon { width: 20px; height: 20px; }
.service-personal-gate .service-gate-panel h1 { font-size: 29px; letter-spacing: -1px; line-height: 1.5; margin-top: 14px; font-weight: 640; color: var(--ink); }
.service-personal-gate .service-gate-caption { margin: 11px 0 30px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.service-personal-gate .field-label { font-size: 11px; gap: 9px; }
.service-personal-gate .service-gate-panel input { height: 48px; border: 1px solid var(--line); background: var(--input); border-radius: 8px; padding: 0 14px; color: var(--ink); font-size: 13px; }
.service-personal-gate .service-gate-panel input::placeholder { color: var(--quiet); font-size: 11px; }
.service-personal-gate .service-login-submit { min-height: 46px; justify-content: space-between; font-size: 12px; border-radius: 8px; padding: 0 17px; margin-top: 3px; }
.service-personal-gate .service-gate-note { margin-top: 25px; padding-top: 19px; color: var(--quiet); border-color: var(--line-soft); font-size: 10px; line-height: 1.8; }
.service-personal-gate .service-gate-footer { bottom: 20px; font-size: 8px; color: var(--quiet); letter-spacing: 1.7px; }

@media (min-width:1500px) {
  .app-main #page { padding-top: 43px; }
  .mf-hero { min-height: 305px; padding: 36px 43px; }
  .mf-hero h2 { font-size: 42px; }
  .projects-grid:not(.list-view) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:1190px) {
  .app-main .topbar-actions .mode-indicator { display: none; }
  .topbar-kicker, .topbar-divider { display: none; }
  .app-main .topbar { padding-inline: 28px; }
  .app-main #page { padding-inline: 28px; }
  .mf-hero { padding: 29px; }
  .mf-hero-actions { gap: 17px; }
  .mf-flow-art { transform: scale(.92); transform-origin: right center; }
}
@media (max-width:1050px) and (min-width:701px) {
  .workspace-sidebar { width: 76px; padding: 28px 12px 22px; }
  .workspace-sidebar .brand { padding: 0; justify-content: center; }
  .workspace-sidebar .brand-word, .sidebar-section-label, .sidebar-bottom, .workspace-sidebar .nav-label { display: none; }
  .workspace-sidebar .workspace-nav { margin-top: 45px; gap: 12px; }
  .workspace-sidebar .workspace-nav a { padding: 13px; justify-content: center; }
  .app-main { margin-left: 76px; }
}
@media (max-width:850px) {
  .mf-hero { grid-template-columns: 1fr; min-height: 0; padding: 30px; }
  .mf-hero h2 { font-size: 36px; }
  .mf-flow-art { display: none; }
  .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .dashboard-stats .mf-stat { padding: 16px 18px; }
  .list-view .project-card { grid-template-columns: 90px minmax(0,1fr) 100px; }
  .list-view .project-card > footer { grid-column: 2/-1; }
  .dashboard-lower { gap: 14px; }
  .workspace-journey { gap: 9px; }
  .workspace-journey > span { flex: 0 0 100%; text-align: center; margin: 0 0 3px; }
  body .service-personal-gate { padding: 30px; }
  .mf-gate-story { padding: 33px; }
  .mf-gate-story h2 { font-size: 30px; }
  .service-personal-gate .service-gate-panel { padding: 42px 32px; }
}
@media (max-width:700px) {
  .workspace-sidebar { inset: auto 0 0; width: 100%; height: auto; padding: 0; background: var(--surface); border: 0; border-top: 1px solid var(--line); box-shadow: 0 -5px 25px #23331c06; }
  .workspace-sidebar > .brand, .sidebar-section-label, .sidebar-bottom { display: none; }
  .workspace-sidebar .workspace-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; padding: 6px 9px max(7px,env(safe-area-inset-bottom)); margin: 0; }
  .workspace-sidebar .workspace-nav a { flex-direction: column; justify-content: center; gap: 5px; padding: 9px 2px 7px; min-height: 55px; color: var(--muted); border-radius: 9px; font-size: 9px; }
  .workspace-sidebar .workspace-nav a.active { color: var(--accent); background: var(--mf-mint); }
  .workspace-sidebar .workspace-nav a:hover { color: var(--accent); background: var(--raised); }
  .workspace-sidebar .workspace-nav .icon { width: 18px; height: 18px; }
  .workspace-sidebar .nav-label { white-space: nowrap; font-size: 9px; }
  .app-main { margin-left: 0; padding-bottom: 84px; }
  .app-main .topbar { min-height: 61px; height: 61px; padding: 0 18px; gap: 8px; }
  .topbar-leading { flex: 1; font-size: 11px; overflow: hidden; }
  .app-main .topbar-actions { gap: 1px; flex: none; }
  .app-main .topbar-actions > :is(.icon-button, .theme-toggle, .topbar-updates, .topbar-feedback),
  .app-main .topbar-actions .service-account-button { min-width: 29px; width: 29px; min-height: 33px; height: 33px; padding: 6px; }
  .app-main #service-account { padding-left: 4px; margin-left: 2px; }
  .app-main #page { padding: 26px 20px 15px; }
  .page-heading { align-items: flex-start; margin-bottom: 22px; }
  .page-heading h1, .dashboard-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 12px; }
  .mf-date { display: none; }
  .mf-hero { padding: 27px 25px; margin-bottom: 18px; border-radius: 13px; }
  .mf-hero h2 { font-size: 33px; letter-spacing: -1.4px; }
  .mf-eyebrow { font-size: 7px; letter-spacing: 1.2px; }
  .mf-hero-copy > p { font-size: 11px; }
  .mf-hero-actions { gap: 18px; margin-top: 21px; }
  .mf-hero-actions .btn { min-height: 40px; padding: 9px 13px; font-size: 11px; }
  .mf-quiet-link { font-size: 10px; gap: 5px; }
  .dashboard-stats { gap: 10px; margin-bottom: 27px; }
  .dashboard-stats .mf-stat { padding: 15px 16px; border-radius: 10px; }
  .mf-stat-label > span:first-child { font-size: 10px; }
  .mf-stat-icon { width: 25px; height: 25px; }
  .dashboard-stats .mf-stat strong { font-size: 27px; margin-top: 11px; }
  .mf-stat > p { font-size: 8px; margin-top: 11px; }
  .dashboard-projects .section-head { align-items: center; flex-wrap: wrap; gap: 14px; }
  .dashboard-projects h2 { font-size: 16px; }
  .collection-tools { margin-left: auto; gap: 7px; }
  .project-search #project-filter { width: 116px !important; font-size: 10px !important; }
  .project-filters { gap: 2px; flex-wrap: wrap; margin-bottom: 16px; }
  .project-filters button { padding: 6px 9px; font-size: 10px; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card { padding: 20px; }
  .list-view .project-card { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0; }
  .list-view .project-card-top { margin-bottom: 13px; }
  .list-view .project-card > footer { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
  .collection-empty.mf-first-project { padding: 32px 18px 28px; }
  .mf-first-project h3 { font-size: 15px; }
  .mf-first-project > p { font-size: 11px; }
  .mf-empty-caption { gap: 6px; font-size: 8px; }
  .dashboard-lower { grid-template-columns: 1fr; margin-top: 20px; gap: 13px; }
  .dashboard-lower .dashboard-box { padding: 20px; }
  .workspace-journey { gap: 7px; padding: 5px 0 13px; margin-top: 23px; }
  .workspace-journey b { font-size: 9px; gap: 3px; }
  .workspace-journey > .icon { width: 8px; height: 8px; }
  .workspace-journey b i { display: none; }
  .app-footer { align-items: flex-start; font-size: 9px; gap: 9px; }
  .app-footer > span { max-width: 75%; overflow-wrap: anywhere; }
  .home-focus { align-items: flex-start; flex-direction: column; gap: 14px; padding: 18px; }
  .home-focus h2 { font-size: 14px; }
  .project-heading h1 { font-size: 22px; }
  .project-heading-actions { gap: 5px; }
  .workflow-path { margin-right: -20px; max-width: calc(100% + 20px); padding-right: 20px; }
  .next-step-line { flex-wrap: wrap; padding: 13px; }
  .stage-title h2 { font-size: 21px; }
  body .service-personal-gate { padding: 26px 20px 42px; align-items: center; }
  .service-personal-gate .mf-access-shell { display: block; max-width: 430px; border-radius: 17px; }
  .mf-gate-story { min-height: 0; padding: 28px 29px; }
  .mf-gate-story .brand-word { font-size: 23px; }
  .mf-gate-story-copy { padding: 27px 0 0; margin: 0; }
  .mf-gate-story-copy > span, .mf-gate-story-copy p, .mf-gate-story-foot { display: none; }
  .mf-gate-story h2 { font-size: 26px; line-height: 1.45; margin: 0; letter-spacing: -1px; }
  .mf-gate-drawing { width: 210px; height: 210px; right: -85px; bottom: -90px; }
  .service-personal-gate .service-gate-panel { padding: 31px 29px 28px; }
  .service-personal-gate .mf-gate-lock { display: none; }
  .service-personal-gate .service-gate-panel h1 { font-size: 25px; margin-top: 10px; }
  .service-personal-gate .service-gate-caption { font-size: 11px; margin: 9px 0 24px; }
  .service-personal-gate .service-gate-note { font-size: 9px; margin-top: 22px; }
  .service-personal-gate .service-gate-footer { bottom: 15px; position: absolute; }
}
@media (max-width:370px) {
  .app-main .topbar-actions > .topbar-feedback { display: none; }
  .collection-tools { width: 100%; justify-content: space-between; }
  .project-search { flex: 1; }
  .project-search #project-filter { width: 100% !important; }
  .mf-hero { padding: 25px 21px; }
  .mf-hero h2 { font-size: 30px; }
  .mf-hero-actions { gap: 12px; }
}
.automation-result-video {
  margin: 0;
}
.automation-result-video video {
  display: block;
  width: 100%;
  max-height: 65vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  margin-top: 8px;
  background: #161616;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 의도 점검 — 사용자가 적은 말과 자동화가 다른 곳 */
.intent-panel { border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 12px; background: var(--surface); padding: 14px 18px; margin: 0 0 16px; }
.intent-panel.has-block { border-left-color: var(--red); }
.intent-panel.ok { border-left-color: var(--green, #2f7d4f); padding: 10px 18px; }
.intent-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.intent-head > .btn { margin-left: auto; }
.intent-head .icon { width: 18px; height: 18px; }
.intent-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.intent-issue { border-top: 1px solid var(--line); padding-top: 10px; }
.intent-issue:first-child { border-top: 0; padding-top: 0; }
.intent-issue.stale { opacity: .78; }
.intent-issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.intent-issue p { margin: 4px 0 0; font-size: 13px; }
.intent-quotes { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); font-size: 12.5px; display: grid; gap: 3px; }
.intent-who { display: inline-block; min-width: 0; margin-right: 6px; color: var(--quiet); font-size: 11.5px; }
.intent-actions { margin-top: 6px; gap: 6px; align-items: center; }
.intent-resolve { display: inline-flex; gap: 6px; }
.intent-resolve input { min-width: 180px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.intent-more summary { cursor: pointer; margin-top: 8px; font-size: 13px; }
.intent-card-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; color: var(--amber); text-decoration: none; }
.intent-card-tag.block { color: var(--red); }
.intent-card-tag .icon { width: 14px; height: 14px; }
.home-intent { margin-bottom: 24px; }
.production-recipe .recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; margin: 0; }
.production-recipe dt { font-size: 12px; color: var(--quiet); }
.production-recipe dd { margin: 2px 0 0; font-weight: 500; }
.production-recipe dd small { display: block; font-weight: 400; font-size: 11.5px; color: var(--quiet); }
.recipe-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.current-run .spinner { display: inline-block; vertical-align: -2px; margin-right: 4px; }
.run-thumb { display: block; width: 220px; max-width: 100%; margin-top: 6px; border-radius: 8px; border: 1px solid var(--line); }
.intent-panel.compact { padding: 8px 18px; }
.intent-elsewhere { margin: 8px 0 0; color: var(--quiet); }
.intent-panel.compact .intent-elsewhere { margin: 0; }
.step-alert { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 600; line-height: 16px; color: var(--surface); background: var(--amber); vertical-align: 1px; }
.references-section .reference-item { border-top: 1px solid var(--line); padding-top: 10px; }
.references-section .reference-item:first-of-type { border-top: 0; }
.reference-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reference-body { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 14px; margin-top: 8px; }
.reference-sheet { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.reference-rules { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
@media (max-width: 760px) { .reference-body { grid-template-columns: 1fr; } }
.review-wait .review-video { width: 100%; max-width: 980px; aspect-ratio: 16 / 10.4; border: 0; border-radius: 8px; background: #000; }


.production-chat-log {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}
.production-chat-log:empty { display: none; }
.production-chat-log .chat-msg p { white-space: pre-wrap; overflow-wrap: anywhere; }

.automation-next > .card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.automation-next h3, .automation-next p { margin: 0; }
.automation-next p { margin-top: 4px; }
.automation-disclosure > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.automation-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.automation-disclosure-body { display: grid; gap: 10px; padding: 12px 16px; }
.automation-prompt-text { white-space: pre-wrap; font: inherit; margin: 0; }


#production-chat .production-chat-log {
  display: flex;
  flex-direction: column;
  height: clamp(280px, 48vh, 560px);
  min-height: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
#production-chat-message { min-height: 112px; resize: vertical; }

.trial-report { display: grid; gap: 10px; overflow-wrap: anywhere; }
.trial-report :is(h3, h4, h5, h6, p, ul, ol) { margin: 0; }
.trial-report :is(ul, ol) { padding-inline-start: 22px; }
.trial-report li + li { margin-top: 5px; }
.trial-report .simple-details > :not(summary) { margin-top: 10px; }
.trial-report .report-table-scroll { max-width: 100%; overflow-x: auto; }
.trial-report table { min-width: 460px; }


.automation-intent-inline { flex-basis: 100%; }
.automation-intent-inline > summary { padding-inline: 0; }
.automation-intent-inline .intent-panel { margin: 8px 0 0; }
