:root {
  color-scheme: light;
  --ink: #1f2430;
  --muted: #5e687a;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --line: #e2e5eb;
  --soft: #f5f6f8;
  --tint: #eef0ff;
  font: 16px/1.55 Inter, "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, select, input { font: inherit; color: inherit; }
button, a, input, select { touch-action: manipulation; }
button { padding: 0; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.35; letter-spacing: -.035em; }
h2 { font-size: 1.05rem; line-height: 1.4; }
h3 { font-size: 1rem; line-height: 1.5; }
[hidden] { display: none !important; }
:where(button,a,input,select):focus-visible, .date-label:focus-within, .search-box:focus-within {
  outline: 3px solid #817af3; outline-offset: 2px;
}
.skip { position: fixed; top: -80px; left: 10px; z-index: 20; padding: 10px 16px; background: white; }
.skip:focus { top: 8px; }
.icon { width: 1.1rem; height: 1.1rem; display: block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
[data-icon] { display: inline-flex; align-items: center; flex: none; }

.shell { max-width: 1180px; margin: 0 auto; padding: 23px 18px 55px; }
.masthead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.masthead-title { min-width: 0; }
.primary-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 15px;
  color: white; background: var(--accent); border-radius: 9px; font-size: .875rem; font-weight: 700; text-decoration: none;
}
.primary-action:hover { background: var(--accent-dark); }
.primary-action .icon { width: 15px; height: 15px; }
.freshness { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: .8125rem; }
.refresh { display: grid; place-items: center; width: 29px; height: 26px; color: var(--muted); border-radius: 6px; }
.refresh:hover, .current:hover, .step:hover, .dialog-close:hover { background: #e9eaf2; }
.refresh .icon { width: 15px; height: 15px; }
.notice { margin-top: 14px; padding: 11px 13px; background: white; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; }
.notice.error { background: #fff6f1; border-color: #f2c6ae; color: #8d4222; }
.nav { display: flex; gap: 4px; align-items: stretch; margin: 16px 0; border-bottom: 1px solid #dce0e7; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin-bottom: -1px; padding: 8px 13px;
  outline-offset: -2px; color: var(--muted); font-size: .9rem; font-weight: 650; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--accent-dark); background: #f0f1fb; }
.nav a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); }
main { min-width: 0; }
main:focus { outline: none; }
.page-header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 13px; }
.page-header h2 { font-size: 1.16rem; letter-spacing: -.01em; }
.intro, .sub, .count-note, .graph-note { color: var(--muted); }
.intro { font-size: .875rem; }
.sub, .graph-note { font-size: .8125rem; margin-top: 3px; }
.count-note { font-size: .875rem; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.metric, .panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px; }
.metric { padding: 12px 15px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.metric-icon { display: grid; place-items: center; flex: none; width: 25px; height: 25px; border-radius: 7px; color: #6d70a5; background: #f4f4fa; }
.metric-icon .icon { width: 15px; height: 15px; }
.metric-value { margin: 3px 0; font: 700 clamp(1.55rem,2.8vw,1.95rem)/1.18 Inter,"Segoe UI",sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric.primary .metric-value { color: var(--accent); }
.metric-value small { font: 500 .8125rem/1.3 "Yu Gothic UI",sans-serif; color: var(--muted); margin-left: 4px; }
.delta, .metric-example, .metric-note { color: var(--muted); font-size: .8125rem; }
.delta b { margin-left: 4px; font-weight: 650; }
.metric-example, .metric-note { margin-top: 4px; }
.controls, .period-controls, .filters, .board-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.controls { justify-content: space-between; margin-bottom: 16px; }
.filter, .period-picker, .date-label, .segmented, .select-shell { display: inline-flex; align-items: center; }
.filter { min-width: 0; gap: 6px; color: var(--muted); font-size: .875rem; }
.select-shell { position: relative; max-width: 100%; }
select {
  width: 100%; max-width: 190px; min-height: 35px; padding: 6px 28px 6px 9px; line-height: 1.4; cursor: pointer;
  appearance: none; background: white; border: 1px solid #d7dbe4; border-radius: 8px; color: var(--ink); font-size: .875rem;
}
.select-shell::after { content: ""; position: absolute; right: 11px; width: 6px; height: 6px; pointer-events: none; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.segmented { gap: 2px; padding: 3px; border: 1px solid var(--line); background: #eaecf2; border-radius: 8px; }
.segmented button { padding: 4px 13px; border-radius: 5px; font-size: .875rem; font-weight: 650; color: var(--muted); }
.segmented button[aria-pressed=true] { color: var(--accent-dark); background: white; box-shadow: 0 1px 3px #20214323; }
.period-picker { background: white; border: 1px solid #d7dbe4; border-radius: 8px; }
.step, .dialog-close { display: inline-grid; place-items: center; flex: none; width: 29px; height: 33px; border-radius: 7px; }
.step .icon { width: 14px; height: 14px; }
.date-label { position: relative; justify-content: center; min-height: 33px; gap: 6px; padding: 0 3px; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-label .icon { color: var(--muted); width: 15px; height: 15px; }
.date-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-label input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.current { padding: 5px 7px; color: #485268; font-size: .875rem; font-weight: 650; border-radius: 6px; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.panel { padding: 16px 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .8125rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.swatch { width: 9px; height: 9px; display: inline-block; background: var(--accent); border-radius: 2px; }
.swatch.events, .bar.events { background: #8babc9; }
.graph { display: grid; grid-template-columns: 30px minmax(0, 1fr); padding: 10px 0 3px; }
.scale, .plot { height: 162px; position: relative; }
.scale span { position: absolute; right: 6px; transform: translateY(50%); font-size: .75rem; color: var(--muted); line-height: 1; }
.plot { display: flex; align-items: flex-end; isolation: isolate; }
.grid-line { width: 100%; height: 0; position: absolute; z-index: -1; border-top: 1px dashed #e0e4ed; }
.grid-line.base { border-top: 1px solid #ccd2df; }
.bar-pair { height: 100%; min-width: 0; flex: 1; display: flex; justify-content: center; align-items: end; gap: 3px; }
.bar { width: clamp(7px,1.15vw,16px); min-width: 0; background: var(--accent); border-radius: 3px 3px 0 0; }
.plot-labels { grid-column: 2; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin-top: 8px; }
.plot-labels span { text-align: center; font-size: .75rem; color: var(--muted); }
.plot-labels .active { color: var(--accent-dark); font-weight: 700; }
.segmented.compact button { padding: 3px 9px; font-size: .8125rem; }

.break-scroll, .table-scroll { overflow: auto; border: 1px solid #edf0f5; border-radius: 8px; }
.break-scroll { max-height: 225px; }
.break-table, .list-table { width: 100%; border-collapse: collapse; text-align: left; }
.break-table th, .list-table th { background: #f8f9fb; font-size: .8125rem; color: var(--muted); font-weight: 650; }
.break-table td, .list-table td { font-size: .875rem; }
.break-table :is(th,td), .list-table :is(th,td) { padding: 7px 9px; border-bottom: 1px solid #eef0f4; }
.break-table tr:last-child td, .list-table tr:last-child td { border-bottom: 0; }
.break-scroll thead th { position: sticky; top: 0; z-index: 1; }
.break-table td:first-child { overflow-wrap: anywhere; }
.break-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list-table .nowrap { white-space: nowrap; }
.list-table tbody tr:hover { background: #f8f8ff; }
.row-action, .text-action { padding: 2px 0; color: var(--accent-dark); font-size: .875rem; font-weight: 650; text-align: left; }
.row-action:hover, .text-action:hover { text-decoration: underline; }
.table-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.record-counts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 13px; padding: 0; }
.record-counts li { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 3px 8px; overflow-wrap: anywhere; border: 1px solid #e1e4ef; border-radius: 6px; color: #485168; background: #f7f8fc; font-size: .8125rem; }
.record-counts b { color: #343c63; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-status i { display: inline-block; width: 8px; height: 1px; background: #9da8bb; }
.tag { display: inline-block; max-width: 100%; padding: 1px 8px; color: #4545a0; background: var(--tint); border-radius: 999px; font-size: .8125rem; overflow-wrap: anywhere; }
.empty, .lane-empty { padding: 18px 6px; text-align: center; color: var(--muted); font-size: .875rem; }
.board-tools { margin-bottom: 14px; }
.board-scope { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; color: var(--muted); font-size: .875rem; cursor: pointer; }
.board-scope input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: white; color: var(--muted); border: 1px solid #d7dbe4; border-radius: 8px; }
.search-box input { width: clamp(125px,19vw,250px); min-width: 0; background: transparent; border: 0; outline: none; font-size: .875rem; }
.board { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-color: #b8bed2 transparent; }
.lane { --phase: #567bb9; flex: 0 0 clamp(168px,calc((100% - 50px) / 6),235px); padding: 8px; border: 1px solid #e2e5ed; background: #f8f9fb; border-radius: 10px; }
.lane.first { --phase: #22a783; }.lane.firstDone { --phase: #13846a; }.lane.final { --phase: #8a6acf; }
.lane.offer { --phase: #dc9638; }.lane.hired { --phase: #27984f; }.lane.closed { --phase: #929aaa; }.lane.other { --phase: #a07168; }
.lane-head { display: flex; align-items: center; gap: 6px; padding: 3px 2px 8px; }
.lane-head::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 3px; background: var(--phase); }
.lane-head h2 { font-size: .875rem; }.lane-head span { margin-left: auto; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.card-stack { display: grid; gap: 7px; max-height: 65vh; overflow: auto; }
.app-card { width: 100%; padding: 9px 10px; display: grid; gap: 3px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 8px; }
.app-card:hover { border-color: #b7b8f8; box-shadow: 0 2px 7px #4f46e51c; }
.app-card b { font-size: .94rem; overflow-wrap: anywhere; }
.card-role, .owner { font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.app-card .tag { justify-self: start; }
.owner { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.owner .icon { width: 14px; height: 14px; }
.lane-empty { font-size: .8125rem; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.pager span { font-size: .8125rem; color: var(--muted); }.pager button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: .875rem; }

.input-guide { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.input-guide + .input-guide { margin-top: 16px; }
.input-guide h2, .input-guide h3 { margin-bottom: 5px; }
.input-guide p { color: #455069; }
.input-guide p + p { margin-top: 9px; }
.input-guide h2 + .input-step { margin-top: 14px; }
.input-guide ol { margin: 12px 0; padding-left: 1.4em; }
.input-guide ol li { padding: 5px 0; }
.input-step + .input-step { border-top: 1px solid #eceef4; padding-top: 12px; margin-top: 12px; }
.input-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.input-guide a:not(.primary-action) { color: var(--accent-dark); }
dialog { width: min(525px, calc(100% - 28px)); max-height: 85vh; overflow: auto; padding: 21px; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 55px #18223b33; }
dialog::backdrop { background: #17203175; }
.dialog-close { position: absolute; right: 12px; top: 12px; background: #f2f3f7; }
#detail-heading { padding-right: 34px; margin-bottom: 7px; font-size: 1.25rem; }
dl.details { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 0 12px; margin: 14px 0; }
dl.details :is(dd,dt) { margin: 0; padding: 6px 0; border-bottom: 1px solid #eef0f4; font-size: .875rem; overflow-wrap: anywhere; }
dl.details dt { color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 6px; padding: 3px 0 9px 12px; border-left: 2px solid #c9c9f7; font-size: .875rem; }
.timeline time { font-size: .8125rem; color: var(--muted); }

@media (max-width: 820px) {
  .content-grid { grid-template-columns: minmax(0,1fr); }
  .controls { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .shell { padding: 16px 12px 36px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric { padding: 10px 12px; }.metric-label { font-size: .8125rem; }
  .nav { gap: 1px; margin: 12px 0; }
  .nav a { min-height: 39px; padding: 7px 8px; font-size: .875rem; }
  .page-header { display: block; }.intro { margin-top: 3px; }
  .content-grid { gap: 12px; margin-bottom: 12px; }
  .panel, .input-guide { padding: 13px; }.panel-head { gap: 6px; }
  .filter select { max-width: 145px; }
  .period-controls { gap: 6px; }.segmented button { padding: 4px 9px; }
  .period-picker .step { width: 24px; }.current { padding: 5px; }
  .date-label { font-size: .8125rem; }
  .legend { gap: 6px; }.legend span { gap: 3px; }
  .table-scroll { max-width: 100%; }.list-table :is(th,td) { padding: 7px; }
  .card-stack { max-height: 65vh; }
}
@media (max-width: 420px) {
  .masthead { gap: 6px; }.masthead h1 { font-size: 1.16rem; }
  .primary-action { padding: 7px 9px; min-height: 34px; font-size: .8125rem; }
  .nav { justify-content: space-between; }.nav a { padding-inline: 4px; font-size: .8125rem; }
}
@media (max-width: 350px) {
  .nav { flex-wrap: wrap; justify-content: flex-start; }
  .nav a { min-height: 34px; }
}
