/* Shared compact data disclosure, with full provenance one tap away. */
.market-note{padding:14px 17px;border:1px solid var(--blue-line);background:var(--blue-light);border-radius:var(--r-m)}
.market-note summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
.market-note summary::-webkit-details-marker{display:none}
.market-note summary>span:first-child{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.market-date,.market-disclosure{color:var(--muted);font-size:12px;font-weight:400}
.market-disclosure{display:flex;align-items:center;gap:3px;white-space:nowrap}
.market-disclosure .ui-icon{width:13px;height:13px;transform:rotate(90deg)}
.market-note[open] .market-disclosure .ui-icon{transform:rotate(-90deg)}
.market-note-body{padding-top:14px;margin-top:12px;border-top:1px solid var(--line)}
.market-note-body p{margin:0 0 12px}
.market-note-body>a{font-size:12px}
.mobile-feature-links,.quick-short{display:none}
.result-save-link{font-size:13px;white-space:nowrap;margin-left:auto}
#save-sieve{scroll-margin-top:80px}
@media(max-width:760px){
  :root{--mobile-nav-height:66px;--safe-bottom:env(safe-area-inset-bottom,0px);--action-bottom:calc(var(--mobile-nav-height) + var(--safe-bottom))}
  html{scroll-padding-top:74px}
  body{font-size:15px;overflow-wrap:break-word;padding-bottom:var(--action-bottom)}
  .wide,.narrow{padding:0 20px;margin:0 auto;width:100%}
  .header{height:64px;margin:0;padding:0 20px;border:0;background:#fff}
  .brand{font-size:23px}
  .header>.demo-badge{font-size:12px;color:var(--muted);background:var(--blue-light);border:0;padding:4px 8px}
  .is-tool>.header{display:none}
  .page-top{position:sticky;top:0;z-index:8;height:60px;margin:0 -20px;padding:0 20px;background:#fff;border-bottom:1px solid var(--line);font-size:15px}
  .page-top>a,.page-top>button{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
  .page-top>a{margin-left:-12px}.page-top>.text-button{margin-right:-9px}
  .page-top .real-badge,.page-top .demo-badge{font-size:12px}
  .page-intro{padding:26px 0 22px}
  .page-intro h1{font-size:27px;line-height:1.4;word-break:keep-all}
  .page-intro   .page-intro .muted{font-size:14px;line-height:1.6;margin-top:10px}
  .market-note{margin-bottom:20px;padding:12px 14px;background:var(--blue-light)}
  .market-note summary{gap:6px}.market-note summary>span:first-child{gap:2px 8px}
  .market-note summary b{font-size:12px}.market-date{font-size:12px}.market-disclosure{font-size:12px}
  .market-note-body .small{font-size:12px;line-height:1.8}
  .home-heading{padding:28px 0 20px}
  .home-heading h1{font-size:26px;line-height:1.4;word-break:keep-all}
  .home-heading p{font-size:13px;margin-top:7px;color:var(--muted)}
  .home-page>.market-note{margin-bottom:18px}
  .home-grid{gap:22px}
  .start-sieve{padding:22px;border-radius:var(--r-l);order:0}
  .start-heading h2{font-size:17px}.start-heading>span{font-size:12px;color:var(--muted)}
  .home-number{margin:12px 0 14px;gap:9px;align-items:baseline}
  .home-number strong{font-size:56px;line-height:1.15;letter-spacing:-.065em}
  .home-number>span{font-size:15px}.home-number>span>span{font-size:12px;margin-left:3px}
  .home-dots{grid-template-columns:repeat(25,minmax(0,1fr));gap:4px;max-width:100%;margin-bottom:0}
  .home-dots i{width:5px;height:5px;min-width:0;max-width:5px}
  .quick-start{margin-top:19px}.quick-start>p{font-size:12px;margin:0 0 10px}
  .quick-filters{gap:7px;display:flex;flex-wrap:wrap}
  .quick-filters button{min-height:44px;padding:9px 10px;font-size:12px;gap:5px;border-radius:var(--r-m);flex-grow:1;justify-content:center}
  .quick-full{display:none}.quick-short{display:inline}
  .quick-filters .ui-icon{height:13px;width:13px}
  .home-live-note{font-size:12px;line-height:1.6;margin:11px 0 14px;min-height:18px}
  .button{min-height:52px;font-size:15px;border-radius:var(--r-m);padding:14px 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
  .home-start,.start-sieve>.button{min-height:54px}
  .mobile-feature-links{display:grid;grid-template-columns:1fr 1fr;gap:12px;order:1}
  .mobile-feature-links>a{position:relative;background:#fff;border-radius:var(--r-l);padding:18px;min-width:0}
  .mobile-feature-links .tool-icon{width:36px;height:36px;border-radius:var(--r-m);margin-bottom:13px}
  .mobile-feature-links h2{font-size:17px;margin:0}.mobile-feature-links p{font-size:12px;color:var(--muted);margin-top:3px;word-break:keep-all}
  .mobile-feature-links>a>.ui-icon{position:absolute;right:16px;top:25px;width:16px;height:16px;opacity:.4}
  .home-recommended{order:2}.home-saved{order:3!important}.home-tools{order:4}
  .home-grid .section-heading h2{font-size:18px}.home-grid .section-heading{margin:7px 0 13px;padding:0}
  .recommend-list{padding:0 18px;border-radius:var(--r-l)}
  .recommend-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:20px 0}
  .recommend-copy h3{font-size:15px;line-height:1.5}.recommend-copy p{font-size:12px;max-width:none;line-height:1.6}
  .recommend-numbers .count-flow{font-size:15px;gap:5px;flex-wrap:wrap;max-width:110px}
  .recommend-numbers small{font-size:12px}
  .saved-empty{background:var(--surface);padding:20px;border-radius:var(--r-l)}
  .saved-empty h3{font-size:15px}.saved-empty p{font-size:13px}
  .saved-row b{font-size:15px}.saved-row small{font-size:12px}
  .home-tools .core-tool-row{display:none}.tool-row{min-height:80px;padding:16px 0}
  .tool-row h3{font-size:15px}.tool-row p{font-size:12px}
  .home-disclaimer{font-size:12px;line-height:1.8;margin:24px 0 0;text-align:left}
  .mobile-nav{height:var(--action-bottom);padding:7px 12px calc(7px + var(--safe-bottom));border-top:1px solid var(--line);background:#fff;align-items:flex-start;z-index:12}
  .mobile-nav a{min-width:64px;min-height:50px;justify-content:center;gap:5px;border-radius:var(--r-m)}
  .mobile-nav .ui-icon{width:22px;height:22px}.mobile-nav span{font-size:12px;line-height:1.2;font-weight:600}
  .mobile-nav a[aria-current=page]{background:var(--blue-light)}.mobile-nav a[aria-current=page] span{color:var(--blue)}
  footer{padding:28px 20px 24px;gap:3px;font-size:12px}footer span{font-size:12px}
  input:not([type=checkbox]):not([type=range]),select{font-size:16px;min-height:52px}input[type=checkbox]{width:24px;height:24px;flex-shrink:0}
  .text-button{min-height:44px;padding:8px}.section-heading{gap:8px}.section-heading h2{font-size:19px}
  .panel{padding:22px 20px;border-radius:var(--r-l)}
  .universe{padding:20px}.big-count>span{font-size:54px}.universe .dots{gap:4px}.universe .dots i{height:6px;width:6px}
  .step{padding:20px 0}.step-main{min-width:0}.step-top{gap:7px}.step-top b{font-size:14px}.step-main small{font-size:13px}
  .step-actions button{width:44px;height:44px}.add-button{min-height:54px;font-size:15px}
  .bottom-actions,.sticky-action{position:fixed;left:0;right:0;bottom:var(--action-bottom);padding:12px 20px;background:#fff;border-top:1px solid var(--line);z-index:10;margin:0;gap:10px}
  .bottom-actions .secondary{min-width:72px}.bottom-actions .primary{flex:1}.bottom-actions .button{font-size:14px}
  body:has(.bottom-actions),body:has(.sticky-action){padding-bottom:calc(var(--action-bottom) + 78px)}
  .financial-entry{font-size:12px;padding:12px 14px;margin-bottom:18px}
  .search{position:sticky;top:68px;z-index:7;border:1px solid var(--line);background:#fff;min-height:54px;box-shadow:0 0 0 7px var(--bg)}
  .search input{width:100%;font-size:16px!important;padding:12px 0!important;min-height:50px!important}
  .selection-heading{margin:20px 0 12px;font-size:14px}.selected-chips{gap:8px}.chip{font-size:13px;padding:5px 7px 5px 12px}.chip button{min-width:32px;min-height:32px}
  #selection-message{font-size:12px;margin:12px 0}
  .stock-options{max-height:none;overflow:visible;margin-top:16px;background:#fff;border:0;border-radius:var(--r-l);padding:0 14px}
  .stock-choice{min-height:76px;padding:15px 0;gap:12px}.stock-choice .stock-info b{font-size:14px}.stock-choice .stock-info small{font-size:12px}
  .stock-row{padding:18px 0;gap:10px}.stock-info{min-width:0}.stock-info b{font-size:14px;overflow-wrap:anywhere}.stock-info small{font-size:12px}
  .stock-metric{font-size:15px;white-space:nowrap}.stock-metric small{font-size:12px}.stock-mark{width:36px;height:36px;flex-shrink:0}
  .result-save-link{font-size:12px;min-height:44px;display:flex;align-items:center}
  .condition-tags{flex-wrap:nowrap;overflow-x:auto;padding-bottom:10px;margin-bottom:16px}.condition-tags span{white-space:nowrap;font-size:12px;padding:6px 10px;flex-shrink:0}
  .save-panel{padding:22px 20px}.save-panel form{gap:12px}.save-panel input{width:100%}.save-panel .button{width:100%;font-size:14px}
  .time-form select,.time-form input[type=date]{margin-bottom:22px}.time-note p{font-size:13px}.time-note small{font-size:12px}
  .insights{padding:0 18px}.insight{padding:20px 0}.insight b{font-size:14px}.insight p{font-size:13px}.ratio{font-size:23px}
  .return-grid b{font-size:24px}.return-grid small{font-size:12px}.methodology{font-size:12px;line-height:1.8;text-align:left}
  .financial-controls{gap:10px}.financial-form label{font-size:14px}.financial-metric>strong{font-size:30px}
  .financial-period,.financial-source{font-size:12px}.financial-account{font-size:12px}
  .price-table-wrap{border-radius:var(--r-l)}.price-table tbody th,.price-table thead th:first-child{position:sticky;left:0;background:#fff;z-index:1}
  dialog{padding:23px 20px calc(20px + var(--safe-bottom));max-height:90dvh;border-radius:var(--r-l) var(--r-l) 0 0}
  .tabs button{min-height:44px;font-size:13px}.field-list button{min-height:50px;font-size:14px}.close-button{min-width:44px;min-height:44px}
  .editor .input-line input{font-size:22px!important}.toast{bottom:calc(var(--action-bottom) + 90px)}
}
@media(max-width:360px){
  .wide,.narrow{padding-left:16px;padding-right:16px}.page-top{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}
  .home-heading h1{font-size:23px}.start-sieve{padding:19px}.quick-filters button{font-size:12px;padding:9px 8px}
  .market-date{display:none}.mobile-feature-links>a{padding:15px}.mobile-feature-links h2{font-size:16px}
  .recommend-row{grid-template-columns:1fr}.recommend-numbers{text-align:left}.recommend-numbers .count-flow{max-width:none;justify-content:flex-start}.recommend-numbers small{display:none}
}
@media(max-width:760px){
  .home-heading{padding:22px 0 18px}.home-grid{gap:18px}
  .quick-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .quick-filters button{min-width:0;padding:9px 5px;font-size:12px;white-space:nowrap}
  .quick-filters .ui-icon{width:11px;height:11px;flex-shrink:0}
}
@media(max-width:760px){
  .selected-chips:empty{display:none}
  body:has(#reverse-form) .financial-entry{display:none}
  body:has(#reverse-form) .page-intro{padding-bottom:20px}
  .universe .big-count{margin:8px 0 16px}.universe #count-note{margin-top:15px}
  .step-actions{gap:5px}
}
@media(max-width:760px){
  :root{--safe-top:env(safe-area-inset-top,0px)}
  .header{height:calc(64px + var(--safe-top));padding-top:var(--safe-top)}
  .page-top{height:calc(60px + var(--safe-top));padding-top:var(--safe-top)}
  .search{top:calc(68px + var(--safe-top))}
  .home-dots{gap:3px}.home-dots i{width:4px;height:4px}
  .mobile-feature-links>a{padding:16px}.mobile-feature-links .tool-icon{width:32px;height:32px;margin-bottom:8px}
  .section-heading:has(#stock-sort){flex-wrap:wrap}
}
/* Brief explanations stay above the current screen; closing returns focus. */
.term-button{display:inline-grid;place-items:center;width:32px;height:32px;flex-shrink:0;border:1px solid var(--line);border-radius:50%;color:var(--muted);background:var(--bg);font-size:14px;font-weight:600;padding:0}
.step-title,.editor-heading{display:flex;align-items:center;gap:9px;min-width:0}.step-title b{line-height:1.5}.step-top>.blue{flex-shrink:0}
.field-option{display:flex;gap:7px;align-items:center}.field-option>button:first-child{flex:1;min-width:0}.field-list .term-button{width:40px;height:40px;padding:0;justify-content:center;border-radius:50%;flex:0 0 40px;background:var(--blue-light)}
.term-dialog{max-width:480px}.term-dialog .dialog-head{margin-bottom:12px}.term-dialog .term-dialog>h2{font-size:25px}.term-dialog>p{font-size:15px;line-height:1.8;margin-top:16px}.term-example{background:var(--blue-light);border-radius:var(--r-m);padding:18px;margin:20px 0}.term-example>span{font-size:12px;color:var(--blue);font-weight:600}.term-example p{font-size:15px;line-height:1.7;margin-top:7px}.term-dialog>#term-caution{font-size:13px}.term-dialog>.button{margin-top:25px}
.preset-source{display:inline-block;font-size:12px;color:var(--pos);margin-top:6px}.recommend-copy .preset-meaning{font-size:13px;color:var(--muted);max-width:none}.recommend-copy .preset-rules{font-size:12px;color:var(--muted)}.financial-coverage{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.financial-coverage>span{font-size:12px;background:#fff;border-radius:var(--r-m);padding:12px}.financial-coverage b{display:block;color:var(--blue);margin-top:5px;font-size:15px}
#sync-form .button+.button{margin-top:10px}
@media(max-width:760px){.term-button{min-width:40px;min-height:40px}.step-title{gap:4px}.step-title b{font-size:13px}.step-top{align-items:center}.term-dialog{max-width:none}.term-dialog>p{font-size:16px}.term-dialog>h2{font-size:26px}.field-list{max-height:38dvh}.editor-heading{justify-content:space-between}.financial-coverage{gap:8px}}
.financial-availability{font-size:12px;color:var(--muted);background:var(--warn-light);border-radius:var(--r-m);padding:12px 14px;margin:0 0 16px;line-height:1.8}
.preset-picker{margin-bottom:20px;background:#fff;border:1px solid var(--line);border-radius:var(--r-l);overflow:hidden}.preset-picker>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:15px 18px;list-style:none;font-size:14px;font-weight:600}.preset-picker>summary::-webkit-details-marker{display:none}.preset-picker>summary>.ui-icon{height:16px;width:16px;transform:rotate(90deg)}.preset-picker[open]>summary>.ui-icon{transform:rotate(-90deg)}.preset-picker>div{display:grid;grid-template-columns:1fr 1fr;max-height:340px;overflow:auto;border-top:1px solid var(--line);padding:0 16px;gap:0 16px}.preset-picker a{display:flex;flex-direction:column;padding:15px 0;border-bottom:1px solid var(--line);min-width:0}.preset-picker b{font-size:13px}.preset-picker small{font-size:12px;line-height:1.7;color:var(--muted);margin-top:5px}
@media(max-width:760px){.preset-picker>div{grid-template-columns:1fr;max-height:40dvh}.preset-picker a{min-height:70px}.preset-picker b{font-size:14px}.preset-picker small{font-size:12px}}
/* API availability is distinct from financial-data coverage. */
.dart-status{position:fixed;right:16px;bottom:14px;z-index:20;display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--line);border-radius:var(--r-l);background:#fff;color:var(--muted);font-size:12px;line-height:1.4}.dart-status i{width:6px;height:6px;border-radius:50%;background:var(--muted);flex-shrink:0}.dart-status[data-status=available] i{background:var(--pos)}.dart-status[data-status=maintenance] i{background:var(--warn)}.dart-status[data-status=unavailable] i{background:var(--danger)}
@media(max-width:760px){.dart-status{position:relative;right:auto;bottom:auto;z-index:auto;width:max-content;margin:6px 20px 0 auto;padding:4px 7px;border:0;background:transparent;font-size:12px}.is-tool>.dart-status{margin-top:8px}}
.valuation-availability{font-size:12px;color:var(--muted);text-align:right;margin:0 0 14px}.valuation-line{display:flex;flex-wrap:wrap;gap:3px 9px;margin-top:6px;font-size:12px;color:var(--muted)}.valuation-line b{font-size:12px;font-weight:600;color:var(--muted)}

/* One compact wordmark: dots narrow from three to one as stocks pass a sieve. */
.brand{gap:9px;flex-shrink:0;white-space:nowrap}
.brand-mark{display:block;width:32px;height:32px;flex-shrink:0;border-radius:var(--r-m)}
.brand-wordmark{display:inline-flex;align-items:center;gap:2px;line-height:1;letter-spacing:-.06em}
.brand-wordmark>span{font-size:25px;font-weight:700;color:var(--ink);line-height:1.15}
.brand-wordmark>em{font-size:27px;font-style:normal;font-weight:700;letter-spacing:-.065em;line-height:1;font-variant-numeric:lining-nums;transform:translateY(1px);color:var(--blue)}
@media(max-width:760px){.brand{gap:8px}.brand-mark{width:29px;height:29px}.brand-wordmark>span{font-size:23px}.brand-wordmark>em{font-size:25px}}
.reverse-target h2,.reverse-heading h2{font-size:17px}.reverse-target .tabs{margin-top:14px;margin-bottom:10px}.reverse-heading{margin-top:30px}.reverse-condition{padding:20px 0;border-bottom:1px solid var(--line)}.reverse-condition-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.reverse-check{display:flex;gap:10px;align-items:center;cursor:pointer;min-height:44px}.reverse-check b{font-size:16px}.reverse-controls{display:flex;align-items:center;gap:10px;margin:12px 0}.reverse-controls input{width:150px;font-size:20px;font-weight:700;padding:12px 14px;font-variant-numeric:tabular-nums}.reverse-controls select{margin-left:auto;max-width:120px}.reverse-controls>span{font-size:14px;color:var(--muted)}.reverse-coverage{font-size:13px;color:var(--blue);font-weight:600}.reverse-condition .small{font-size:12px}.reverse-condition.is-unselected .reverse-controls{opacity:.6}.reverse-more{margin-top:18px}.reverse-more>summary{padding:12px 0;cursor:pointer;font-size:14px;color:var(--muted)}.reverse-more>summary span{color:var(--blue);margin-left:7px}.reverse-method{font-size:12px;line-height:1.9;margin-top:24px}.reverse-summary{display:flex;gap:36px;margin:20px 0}.reverse-summary>div{display:flex;flex-direction:column;gap:4px}.reverse-summary span{font-size:12px;color:var(--muted)}.reverse-summary b{font-size:26px;letter-spacing:-.04em}.reverse-combined .button{margin-top:20px}.reverse-controls input[aria-invalid=true]{border-color:var(--danger)}
@media(max-width:760px){.reverse-condition{padding:16px 0}.reverse-check b{font-size:15px}.reverse-controls input{font-size:20px;width:130px;min-height:48px}.reverse-controls select{font-size:16px;min-height:48px}.reverse-condition-head .term-button{width:40px;height:40px}.reverse-summary{gap:25px}.reverse-summary b{font-size:24px}}
.number-stepper{display:flex;align-items:stretch;gap:5px;min-width:0}.number-stepper input[type=number]{appearance:textfield;-moz-appearance:textfield;min-width:0;flex:1;width:90px;margin:0}.number-stepper input::-webkit-inner-spin-button,.number-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-arrow{display:grid;place-items:center;flex:0 0 44px;width:44px;min-height:48px;padding:0;border:1px solid var(--line);border-radius:var(--r-m);background:var(--blue-light);color:var(--blue);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.number-arrow svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.number-arrow:active{background:var(--blue-soft)}.number-arrow:disabled{opacity:.35}.input-line,.reverse-controls{flex-wrap:wrap;gap:8px}.input-line .number-stepper,.reverse-controls .number-stepper{flex:1 1 180px;max-width:280px}.input-line select,.reverse-controls select{padding:12px 10px;min-height:48px}.number-adjust-hint{font-size:12px;color:var(--muted);line-height:1.6;margin:0 0 12px}.reverse-condition .number-adjust-hint{font-size:12px}.input-line{margin-bottom:8px}
@media(max-width:760px){.input-line .number-stepper,.reverse-controls .number-stepper{flex-basis:170px}.number-stepper input[type=number]{width:75px;padding:10px;font-size:20px}.number-arrow{flex-basis:44px;min-height:48px}.input-line select,.reverse-controls select{font-size:16px}.input-line>span,.reverse-controls>span{font-size:12px}.number-adjust-hint{font-size:12px}}

/* Result-list trends use cached closes and share the displayed change period. */
.trend-guide{font-size:12px;color:var(--muted);line-height:1.7;margin:-3px 0 8px}.trend-guide span{display:block;font-size:12px}
.stock-trend{width:106px;flex:0 0 106px;display:flex;flex-direction:column;align-items:flex-end;line-height:1.4;font-variant-numeric:tabular-nums}
.stock-trend b{font-size:16px;font-weight:700;margin-top:4px}.stock-trend small{font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap}
.stock-sparkline{display:block;width:100px;height:36px;overflow:visible}.stock-sparkline polyline{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.stock-sparkline circle{fill:currentColor}.stock-sparkline .trend-baseline{stroke:var(--muted);stroke-width:.8;stroke-dasharray:2 3}
.trend-up{color:var(--green)}.trend-down{color:var(--blue)}.trend-flat,.trend-unavailable{color:var(--muted)}
@media(max-width:760px){.stock-trend{width:84px;flex-basis:84px}.stock-sparkline{width:80px;height:32px}.stock-trend b{font-size:15px}.stock-row .valuation-line b{font-size:12px}.stock-row .stock-info{flex:1}.stock-row .stock-info>small{font-size:12px}.stock-row .valuation-line{gap:2px 7px}.trend-guide{font-size:12px}}
@media(max-width:380px){.stock-row .stock-mark{display:none}.stock-trend{width:78px;flex-basis:78px}.stock-sparkline{width:74px}}

.condition-period-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 6px}.condition-period-row label{font-size:13px;font-weight:600}.condition-period-row select{min-height:44px;padding:9px 14px;min-width:120px;background:var(--blue-light)}.condition-period-row small{font-size:12px}
@media(max-width:440px){.condition-period-row{gap:8px 12px}.condition-period-row small{flex-basis:100%}}

/* Compact local company logos with a readable initial underneath. */
.stock-mark.company-mark{position:relative;display:grid;place-items:center;overflow:hidden;background:#fff!important;border:1px solid var(--line);flex:0 0 36px;line-height:1}
.company-mark .company-logo{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:#fff}
@media(max-width:380px){.stock-row .stock-mark.company-mark{display:grid;width:32px;height:32px;flex-basis:32px}.stock-row{gap:8px}}

/* A quiet abstract sieve: dots fall away, survivors regroup. */
.sieve-stage{position:relative;padding:6px 0 24px;overflow:hidden;isolation:isolate}.sieve-stage .dots i{transition:background .2s,opacity .2s}.sieve-stage .dots i.out{opacity:.28;transform:scale(.65)}
.sieve-mesh{position:absolute;top:0;left:0;right:0;height:8px;z-index:2;opacity:0;pointer-events:none;border-top:1px dashed var(--blue-line);border-bottom:1px dashed var(--blue-line);background:repeating-linear-gradient(90deg,transparent 0 10px,var(--blue-soft) 10px 11px,transparent 11px 20px)}
.sieve-feedback{border-top:1px solid var(--line);margin-top:15px;padding-top:14px;min-height:62px;line-height:1.6}.sieve-feedback b{display:block;font-size:13px;font-weight:600;color:var(--muted)}.sieve-feedback small{display:block;margin-top:3px;font-size:12px;color:var(--muted)}.universe #count-note{margin-top:4px}
@media(max-width:760px){.sieve-stage{padding-bottom:20px}.sieve-feedback{min-height:60px;padding-top:12px}.sieve-feedback b{font-size:12px}}
@media(prefers-reduced-motion:reduce){.sieve-mesh{display:none}.sieve-stage .dots i{transition:none}}

#categories{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}#categories button{flex-shrink:0;white-space:nowrap}
.pattern-data-note{font-size:12px;line-height:1.8;margin:0 0 20px;color:var(--muted)}.pattern-data-note summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--muted)}.pattern-data-note p{margin:8px 0}.pattern-coverage{margin-top:16px;font-size:12px}.pattern-coverage>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.pattern-coverage b{white-space:nowrap;color:var(--muted)}.pending-patterns{font-size:13px;line-height:1.8;color:var(--muted);padding-left:20px}.pending-patterns li{margin:10px 0}

.condition-search{width:100%;min-height:44px;padding:10px 13px;background:var(--blue-light);margin:8px 0 12px;font-size:13px}.condition-search::placeholder{color:var(--muted)}

/* Shared return scale within each chart; a quieter market reference. */
.stock-sparkline .trend-benchmark{stroke:var(--muted);stroke-width:1.25}
.trend-guide .trend-legend{display:flex;align-items:center;gap:6px;font-size:12px;margin:5px 0;color:var(--muted)}
.trend-legend i{width:15px;height:2px;display:inline-block;border-radius:var(--r-s)}
.trend-legend .legend-stock{background:var(--blue)}.trend-legend .legend-index{background:var(--muted);margin-left:9px}
/* Plain steps for historical screening and a compact investment flow. */
.journey-steps{list-style:none;padding:0;margin:0 0 16px;display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.journey-steps li{display:flex;gap:7px;align-items:center}.journey-steps b{display:grid;place-items:center;width:22px;height:22px;background:var(--blue-light);color:var(--blue);border-radius:50%;font-size:12px}.time-explanation{font-size:13px;color:var(--muted);margin:0 0 24px;line-height:1.8}.time-unsupported{margin:28px 0}.time-unsupported h2{font-size:18px}.unsupported-row{padding:20px 0;border-bottom:1px solid var(--line)}.unsupported-row form,.unsupported-row>.button{margin-top:12px}.flow-entry{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:28px}.flow-entry b{display:block;font-size:15px}.flow-entry small{display:block;color:var(--muted);margin-top:5px;font-size:12px}.flow-entry>.ui-icon{width:19px;flex-shrink:0;color:var(--blue)}.method-details{font-size:12px;color:var(--muted);margin:22px 0 35px}.method-details summary{cursor:pointer;padding:12px 0;min-height:44px}.method-details p{line-height:1.9;margin-top:4px}
.portfolio-form{padding:8px 0 30px}.portfolio-form .section-heading{margin:0 0 15px}.portfolio-form h2{font-size:18px}.portfolio-empty{padding:20px;border:1px dashed var(--line-strong);border-radius:var(--r-l);background:#fff;text-align:center}.portfolio-empty p{color:var(--muted);font-size:12px;margin:0 0 16px}.portfolio-empty .button{font-size:14px}.holding-row{display:flex;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.holding-name{flex:1;min-width:0}.holding-name b{display:block;font-size:14px;overflow-wrap:anywhere}.holding-name small{font-size:12px}.holding-weight{display:flex;gap:6px;align-items:center;flex:0 0 auto}.holding-weight input{width:92px;text-align:right;font-size:16px;padding:11px 12px;font-variant-numeric:tabular-nums}.holding-weight>span{font-size:12px}.holding-remove{width:40px;height:44px;background:transparent;color:var(--muted);border-radius:var(--r-m);font-size:22px;flex-shrink:0}.weight-controls{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:16px 0 4px;font-size:12px}.weight-controls button,#choose-holdings{min-height:44px;background:transparent;padding:0;font-weight:600}.weight-controls>span{font-weight:600}.portfolio-date-label{display:block;margin:32px 0 12px;font-size:18px;font-weight:700}.portfolio-form>#calculate-flow{margin-top:24px}.portfolio-form .error-text{margin-top:14px}.import-note{font-size:12px;color:var(--muted);background:var(--blue-light);border-radius:var(--r-m);padding:12px;margin:0 0 10px}
.holdings-dialog{max-width:550px;width:calc(100% - 32px);max-height:90dvh;padding:24px;border:0;border-radius:var(--r-l);overflow:auto;color:var(--ink)}.holdings-dialog::backdrop{background:rgba(22,34,59,.3)}.holdings-dialog .dialog-head{margin-bottom:16px}.holding-picker-tools{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.holding-picker-tools button{min-height:44px;background:transparent}.holdings-picker{max-height:40dvh;overflow:auto;overscroll-behavior:contain}.holding-choice{display:flex;gap:12px;align-items:center;padding:14px 4px;border-bottom:1px solid var(--line);min-height:52px;cursor:pointer}.holding-choice b{font-size:14px;flex:1}.holding-choice small{font-size:12px}.holdings-dialog>p{font-size:12px;line-height:1.8;margin:14px 0}.holdings-dialog>.button{margin-top:6px}
.portfolio-result{scroll-margin-top:20px;padding-top:30px;border-top:1px solid var(--line)}.portfolio-result .section-heading{align-items:flex-start;flex-wrap:wrap;gap:4px}.portfolio-result h2{font-size:19px}.flow-headline{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:8px 0}.flow-headline>span{font-size:12px;color:var(--muted)}.flow-headline b{display:block;color:var(--ink);font-size:32px;letter-spacing:-.04em;font-variant-numeric:tabular-nums;line-height:1.5}.flow-headline strong{font-size:18px;margin-left:auto}.flow-chart-wrap{background:#fff;border-radius:var(--r-l);margin:12px 0 4px;padding:12px 0 0}.flow-chart-wrap svg,.composition-details svg{display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y}#investment-chart{cursor:crosshair}.flow-scrubber-label{display:block;font-size:12px;color:var(--muted);margin-top:16px}#flow-scrubber{padding:0;min-height:44px;border:0;background:transparent;accent-color:#2161f4}.flow-observation{display:flex;justify-content:space-between;gap:10px;font-size:12px;background:var(--blue-light);border-radius:var(--r-m);padding:13px 15px;color:var(--blue-ink);font-variant-numeric:tabular-nums}.allocation-title{font-size:17px;margin-top:30px}.allocation-bar{height:14px;border-radius:var(--r-s);overflow:hidden;display:flex;background:var(--surface);margin:20px 0 14px}.allocation-bar>span{height:100%}.allocation-heading,.allocation-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 80px;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}.allocation-heading{font-size:12px;color:var(--muted);padding:7px 0}.allocation-row{font-size:12px}.allocation-heading>span:nth-child(n+2),.allocation-row>span:nth-child(2),.allocation-row>b{text-align:right}.allocation-name{display:flex;gap:7px;align-items:center;min-width:0}.allocation-name b{font-size:12px;overflow-wrap:anywhere}.allocation-name i{display:block;width:7px;height:7px;border-radius:50%;flex:0 0 7px}.composition-details{margin:22px 0;font-size:13px}.composition-details summary{min-height:44px;padding:12px 0;cursor:pointer;color:var(--blue)}.composition-details svg{background:#fff;border-radius:var(--r-l);margin-top:15px}.composition-details p,#flow-data-note{font-size:12px;line-height:1.8}.time-flow{flex-wrap:wrap}
@media(max-width:760px){.journey-steps{gap:10px;font-size:12px;display:grid}.journey-steps b{width:24px;height:24px}.time-explanation{font-size:12px}.holding-weight input{width:78px;font-size:16px}.holding-row{gap:8px}.holding-name b{font-size:13px}.holding-remove{width:32px}.portfolio-form h2{font-size:16px}.portfolio-date-label{font-size:16px}.flow-headline{gap:15px}.flow-headline b{font-size:30px}.flow-headline strong{font-size:16px}.allocation-heading,.allocation-row{grid-template-columns:minmax(0,1fr) 108px 68px;gap:8px}.allocation-heading{font-size:12px}.allocation-row{font-size:12px}.allocation-name b{font-size:12px}.flow-observation{font-size:12px;padding:12px}.holdings-dialog{padding:20px}.flow-entry b{font-size:14px}.flow-entry small{font-size:12px}.portfolio-result{scroll-margin-top:14px}.portfolio-date-label+input{font-size:16px;min-height:48px}.flow-headline>span{font-size:12px}}
.holding-weight .number-stepper{width:200px}.holding-weight .number-stepper input{width:76px;padding:9px}.holding-weight .number-arrow{min-height:44px;flex-basis:40px;width:40px}.holding-weight .number-stepper+span{flex-shrink:0}
@media(max-width:760px){.holding-row{display:grid;grid-template-columns:1fr 36px;gap:7px 10px}.holding-name{grid-column:1;grid-row:1}.holding-remove{grid-column:2;grid-row:1;width:36px}.holding-weight{grid-column:1/-1;grid-row:2;justify-content:flex-end}.holding-weight .number-stepper{width:230px}.holding-weight .number-stepper input{width:100px;padding:10px}.holding-weight .number-arrow{width:44px;flex-basis:44px;min-height:44px}.portfolio-form #weight-total{white-space:nowrap}}

/* ===== 손가락이 굵어도 편한 입력: [−][값][+] 큰 버튼, 감소·증가는 모양과 색으로 구분 ===== */
.number-stepper[hidden]{display:none}
.number-stepper{gap:8px;align-items:stretch}
.number-stepper .number-arrow{flex:0 0 52px;width:52px;min-height:52px;border-radius:var(--r-m);touch-action:none;transition:transform .08s,background .12s}
.number-stepper .number-arrow svg{width:24px;height:24px;stroke-width:3}
.number-stepper .number-arrow.minus{background:var(--surface);border:1.5px solid var(--line-strong);color:var(--ink-2)}
.number-stepper .number-arrow.minus:active{background:var(--surface-2)}
.number-stepper .number-arrow.plus{background:var(--blue);border:1.5px solid var(--blue);color:#fff}
.number-stepper .number-arrow.plus:active{background:var(--blue)}
.number-stepper .number-arrow:active{transform:scale(.95)}
.number-stepper .number-arrow:disabled{opacity:.3}
.number-stepper input[type=number]{flex:1 1 auto;width:auto;min-width:70px;min-height:52px;text-align:center;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums;padding:8px 6px}
.holding-weight .number-stepper{width:auto;flex:0 1 250px}
.holding-weight .number-arrow{flex-basis:52px;width:52px;min-height:52px}
.holding-weight .number-stepper input{width:auto;padding:8px 6px}
@media(max-width:760px){.holding-weight .number-stepper{width:100%;flex:1 1 100%}.holding-weight{justify-content:stretch}.number-stepper input[type=number]{width:auto}}
@media(pointer:coarse),(max-width:760px){
  .number-stepper .number-arrow{flex-basis:56px;width:56px;min-height:56px}.number-stepper input[type=number]{min-height:56px}
  .holding-weight .number-arrow{flex-basis:56px;width:56px;min-height:56px}
  .button,select,input[type=date],input[type=search],input[type=text],input:not([type]){min-height:50px}
  .holding-remove{width:44px;height:44px;min-width:44px;font-size:22px}
  .holding-choice{padding:14px 8px;min-height:52px}
  .seg-btn{min-height:42px;padding:9px 16px;font-size:14px}
  .legend-chip{min-height:42px;padding:8px 14px;font-size:13px}
  .text-link{display:inline-block;padding:12px 6px}
  .mode-choice{padding:16px 14px;min-height:64px}.mode-choice input,.side-choice input,.holding-choice input{width:24px;height:24px;margin-top:2px}
  .side-choice label{min-height:48px;padding:0 8px}
  .trade-row .holding-remove{width:44px;height:44px}
  .myport-actions .button{min-height:54px}
}
input[type=range]{-webkit-appearance:none;appearance:none;height:44px;background:transparent;cursor:pointer}
input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:var(--r-s);background:var(--surface-2)}
input[type=range]::-moz-range-track{height:8px;border-radius:var(--r-s);background:var(--surface-2)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:32px;height:32px;margin-top:-12px;border-radius:50%;background:var(--blue);border:4px solid #fff;box-shadow:0 1px 5px #0003}
input[type=range]::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:var(--blue);border:4px solid #fff;box-shadow:0 1px 5px #0003}
.legend-chip i,.allocation-name i{width:13px;height:13px;border-radius:50%;display:inline-block;flex:0 0 13px;border:1px solid #0002}
.myport-legend{max-height:230px;overflow-y:auto;-webkit-overflow-scrolling:touch}

/* 재미 요소: 점이 걸러질 때 숫자가 톡 튀고 걸러진 개수가 떠오릅니다 */
.big-count{position:relative}
.big-count.pop #live-count{animation:count-pop .45s cubic-bezier(.2,1.6,.4,1)}
@keyframes count-pop{0%{transform:scale(1)}35%{transform:scale(1.18)}100%{transform:scale(1)}}
.drop-chip{position:absolute;top:8px;left:calc(50% + 92px);font-size:15px;font-weight:700;padding:2px 9px;border-radius:999px;animation:chip-rise 1.2s ease-out forwards;pointer-events:none;white-space:nowrap}
.drop-chip.down{background:var(--danger-light);color:var(--danger)}.drop-chip.up{background:var(--pos-light);color:var(--ink)}
@keyframes chip-rise{0%{opacity:0;transform:translateY(8px)}15%{opacity:1}100%{opacity:0;transform:translateY(-16px)}}
@media(prefers-reduced-motion:reduce){.big-count.pop #live-count,.drop-chip{animation:none}}
.data-notes{margin:32px 0 8px;padding-top:16px;border-top:1px dashed var(--line);display:grid;gap:8px}.data-notes h2{margin:0;font-size:13px;font-weight:600}
/* 상단 메뉴: 자주 쓰지 않는 도구는 '더 보기'로 */
.nav-more{position:relative;display:inline-block}.nav-more summary{list-style:none;cursor:pointer;padding:6px 2px;color:inherit}.nav-more summary::-webkit-details-marker{display:none}
.nav-more summary::after{content:' ▾';font-size:12px;opacity:.6}
.nav-more>div{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:grid;min-width:150px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:var(--r-m);box-shadow:0 8px 24px #16223b1a}
.nav-more>div a{padding:10px 12px;border-radius:var(--r-m);white-space:nowrap}.nav-more>div a:hover{background:var(--blue-light)}
.header nav .nav-more summary{color:rgb(131,144,157);padding:0}.header nav .nav-more[open] summary,.header nav .nav-more summary:hover{color:var(--ink)}
.header nav .nav-more>div a{color:var(--ink);font-weight:400}

@media(max-width:760px){.drop-chip{left:calc(50% + 78px);font-size:14px}}
.universe{overflow:hidden}
.big-count .drop-chip{font-size:16px;line-height:1.4;font-weight:700;letter-spacing:0}
@media(max-width:760px){.big-count .drop-chip{font-size:14px}}

/* 추천 체 조건 고르기 */
.recommend-item{display:block}
.recommend-knobs{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 18px}.recommend-knobs label{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.recommend-knobs select{min-height:48px;padding:8px 32px 8px 14px;font:inherit;font-size:15px;font-weight:600;color:var(--ink);background:#fff;border:1.5px solid var(--line-strong);border-radius:var(--r-m)}
.recommend-knobs select:focus{outline:2px solid var(--blue);outline-offset:1px}
.preset-picker .recommend-item{display:grid;border-bottom:1px solid var(--line)}.preset-picker .recommend-knobs{padding:0 14px 14px}
/* 닮은꼴 체 */
.period-seg{display:flex;flex-wrap:wrap;gap:6px;background:transparent;padding:0}.period-seg .seg-btn{flex:1 1 calc(50% - 6px);background:var(--surface);border-radius:var(--r-m)}.period-seg .seg-btn[aria-pressed=true]{background:var(--blue);color:#fff;box-shadow:none}
.sim-advanced{margin:14px 0}.sim-advanced summary{cursor:pointer;padding:12px 4px;font-weight:600;color:var(--blue)}.sim-options-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sim-list{display:grid;gap:6px;margin-bottom:12px}
.sim-row{display:grid;grid-template-columns:auto minmax(0,1.3fr) minmax(0,1.2fr) 80px auto;gap:10px;align-items:center;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:var(--r-m);min-height:56px;cursor:pointer}
.sim-row input{width:22px;height:22px}.sim-name,.sim-score{display:grid;min-width:0}.sim-name small,.sim-score small{font-size:12px}.sim-spark{width:80px;height:28px}
@media(max-width:560px){.sim-row{grid-template-columns:auto minmax(0,1fr) auto;gap:6px 10px}.sim-score{grid-column:2/3}.sim-spark{grid-column:2/3;width:100%}.sim-row>b:last-child{grid-row:1;grid-column:3}}
#sim-result .section-heading{flex-wrap:wrap;gap:4px 12px;align-items:baseline}
.sim-ref-row{display:flex;gap:8px;align-items:center;margin-bottom:8px}.sim-ref-row input{min-height:50px}
#sim-us-box,#sim-stock-box{margin-top:12px}
.sim-help{margin:8px 0 4px}.sim-help summary{cursor:pointer;padding:10px 4px;color:var(--blue);font-weight:600}.sim-help p{margin:6px 4px;font-size:13px;line-height:1.7;color:var(--ink-2)}.sim-neutral-note{margin:8px 0;padding:10px 14px;background:var(--blue-light);border-radius:var(--r-m);line-height:1.7}.sim-neutral-note .text-link{background:none;border:0;padding:6px 4px;font:inherit;font-weight:600;cursor:pointer}

/* 내 포트 종목별 표: 평가액·손익 칸은 항상 두 줄(큰 숫자 + 작은 보조 숫자)로 줄바꿈 없이 */
.myport-row .cell-two{display:grid;gap:1px;line-height:1.3;white-space:nowrap}.myport-row .cell-two b{font-size:14px;font-variant-numeric:tabular-nums}.myport-row .cell-two small{font-size:12px;min-height:14px;font-variant-numeric:tabular-nums}
.myport-row .cell-two:last-child{text-align:right}.myport-row.head span:last-child{text-align:right}

/* 표 복사 버튼 */
.copy-tools{display:flex;gap:8px;margin:0 0 8px}.section-heading .copy-tools{margin:0}
.copy-btn{min-height:40px;padding:8px 14px;font:inherit;font-size:13px;font-weight:600;color:var(--blue);background:var(--blue-light);border:0;border-radius:var(--r-m);cursor:pointer}.copy-btn:active{background:var(--blue-soft)}
.copy-tools+.myport-table,.copy-tools+.sim-list{margin-top:0}
[data-copy-table]{-webkit-user-select:text;user-select:text}
footer .footer-realtime{font-weight:700;color:var(--ink-2);font-size:12px}

.similar-box{display:grid;gap:10px;margin:10px 0}.similar-box small{font-size:12px;line-height:1.6}.similar-box select{min-height:50px}
.sim-score-line{display:block;color:var(--blue);font-size:12px}.sim-score-line b{font-weight:700}

/* 공유 창 */
.share-dialog{max-width:min(94vw,520px)}
.share-preview{width:100%;box-sizing:border-box;padding:12px;font:inherit;font-size:13px;line-height:1.6;color:var(--ink-2);background:var(--bg);border:1px solid var(--line);border-radius:var(--r-m);resize:none}
.share-note{margin:8px 0}
.share-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.share-btn{display:grid;gap:2px;padding:14px;min-height:64px;text-align:left;font:inherit;color:var(--ink);background:#fff;border:1.5px solid var(--line-strong);border-radius:var(--r-m);cursor:pointer}
.share-btn:active{background:var(--blue-light)}.share-btn b{font-weight:700}.share-btn small{font-size:12px}
.share-btn[hidden]{display:none}
