/* The tool page. Same tokens as the home page (styles.css). */
.app { background: var(--paper); }
.app-nav { position: sticky; }
.lock { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--engrave); }
.lock svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 420px) { .lock { font-size: 13px; } .app-nav .wordmark { font-size: 20px; } }

.tool { padding-top: 48px; padding-bottom: 120px; }
.tool .lede { margin-top: 18px; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  margin-top: 40px; min-height: 240px; padding: 32px 20px;
  border-radius: 10px; border: 1.5px dashed #9FAA9C; background: var(--sheet);
  text-align: center; cursor: pointer; color: var(--engrave);
  transition: border-color .2s, background-color .2s, transform .2s;
}
.drop:hover, .drop.over { border-color: var(--engrave); background: #F2F6F1; }
.drop.over { transform: scale(1.01); }
.drop:focus-within { outline: 2px solid var(--engrave); outline-offset: 3px; }
.drop-art { width: 64px; height: 64px; margin-bottom: 8px; }
.drop-art .bg { fill: var(--sheet); }
.drop-title { font-family: var(--display); font-size: 26px; color: var(--ink); }
.start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 20px; }
.start-row .small { margin: 0; }
.status { min-height: 24px; margin: 18px 0 0; font-size: 15px; color: var(--ink-2); }
.status.error { color: #9A3B22; font-weight: 600; }

/* Results */
#results { margin-top: 64px; }
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.res-head h2 { margin: 0; }
.res-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; font-weight: 600; color: var(--engrave); }
.checkline svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.checkline.bad { color: #9A3B22; }
.checkline.unknown { color: var(--copper-dark); }
.csv-help { margin-top: 10px; font-weight: 400; color: var(--ink-2); }
.csv-help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.csv-help ul { margin: 8px 0 0; padding-left: 1.2em; }
.csv-help li { margin: 4px 0; max-width: 46em; }
.checkline span { font-weight: 400; color: var(--ink-2); }

.block { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.block:last-child { border-bottom: 0; }
.block > h3 { margin: 0 0 8px; }
.block > .small { margin: 0 0 28px; max-width: 40em; }
.two { display: grid; gap: 40px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; gap: 72px; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.tile { padding: 20px 20px 20px 0; }
.tile + .tile { border-left: 1px solid var(--rule); padding-left: 20px; }
.tile .num { font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; font-weight: 600; }
.tile .what { font-size: 14.5px; color: var(--ink-2); margin-top: 6px; }
@media (max-width: 560px) { .tile + .tile { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } }

/* Spending bars: one hue, value labels in ink, 4px rounded data end */
.bars { list-style: none; margin: 0; padding: 0; }
.bars > li { border-top: 1px solid #DCE1D6; }
.bar-btn {
  width: 100%; display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr auto; align-items: center; gap: 16px;
  padding: 14px 0; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 0;
}
.bar-btn:hover .track i { background: #2A538A; }
.bar-name { font-weight: 600; font-size: 15.5px; }
.bar-name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }
.track { height: 12px; }
.track i { display: block; height: 100%; min-width: 3px; background: var(--blue); border-radius: 0 4px 4px 0; transition: background-color .2s; }
.bar-val { font-weight: 600; text-align: right; white-space: nowrap; }
.bar-val small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }
.places { list-style: none; margin: 0 0 16px; padding: 0 0 0 16px; border-left: 2px solid #DCE1D6; }
.places li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 560px) { .bar-btn { grid-template-columns: 1fr auto; } .track { grid-column: 1 / -1; grid-row: 2; } }

/* Lists of things (subscriptions, fees, places) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid #DCE1D6; }
.list li:last-child { border-bottom: 1px solid #DCE1D6; }
.list .name { font-weight: 600; }
.list .name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.list .amt { text-align: right; white-space: nowrap; font-weight: 600; }
.list .amt small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }
.list .flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.total-row { display: flex; justify-content: space-between; padding: 16px 0 0; font-weight: 700; }
.more { margin-top: 18px; }
.more summary { cursor: pointer; color: var(--engrave); font-weight: 600; font-size: 15px; }
.empty { color: var(--ink-3); margin: 0; }
.note { margin-top: 28px; padding: 16px 18px; background: var(--sheet); border-radius: 6px; font-size: 15px; color: var(--ink-2); }

/* Penny Peek Plus */
.flag.grey { background: #E4E8E1; color: var(--ink-2); }
.tile .what .flag, .list .amt .flag { margin-left: 4px; }
.list .amt small { display: block; margin-top: 2px; }
.since .list { margin-top: 28px; }
.plus { border-bottom: 0; }
.plus .label { margin-bottom: 8px; }
.plus-list { list-style: none; margin: 20px 0 0; padding: 0; max-width: 36em; }
.plus-list li { position: relative; padding: 8px 0 8px 30px; border-top: 1px solid #DDE2D8; }
.plus-list li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--engrave); border-bottom: 2px solid var(--engrave); transform: rotate(-45deg); }
.plus-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.plus-what { max-width: 40em; }
.plus .small a { color: var(--copper-dark); font-weight: 600; }
.remember { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 18px 20px; background: var(--sheet); border-radius: 10px; cursor: pointer; max-width: 40em; }
.remember input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--engrave); cursor: pointer; }
.remember small { display: block; margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
/* phones: the eye logo alone, so the privacy promise fits on one line */
@media (max-width: 420px) { .app-nav .wordmark { font-size: 0; gap: 0; } .lock { font-size: 13px; } }

/* Share your month */
.share-grid { display: grid; gap: 32px; align-items: start; }
.share-copy .small { max-width: 34em; margin: 14px 0 0; }
.share-img { width: min(300px, 70vw); height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: var(--night); box-shadow: 0 30px 60px -28px rgba(15, 22, 32, .55); justify-self: center; }
@media (min-width: 760px) { .share-grid { grid-template-columns: 1fr auto; gap: 56px; } .share-img { width: 300px; } }

/* Fix a category */
.places li { flex-wrap: wrap; align-items: center; row-gap: 0; }
.places .place { flex: 1 1 auto; }
.places select.move {
  flex: 0 0 auto; margin: -2px 0 4px -4px; min-height: 30px; padding: 2px 4px;
  border: 0; border-radius: 6px; background: transparent; color: var(--engrave);
  font: 600 13px var(--text); cursor: pointer;
}
.places select.move:hover { background: #E4ECE6; }
.places li .place + span { flex: none; }
.places li::after { content: ''; flex-basis: 100%; order: 1; }
.places select.move { order: 2; }
.places select.move:focus { outline: 2px solid var(--engrave); outline-offset: 2px; }
.places .more-places { justify-content: flex-start; }
.places .linkish, .fixes .linkish { margin: 0; font-size: 14px; }
.fixes { color: var(--engrave); }
.places li[hidden] { display: none; }
