/* app-specific styles */

.storage-warning { margin: 1rem; padding: 1rem; border: 2px solid currentColor; border-radius: 6px; color: var(--theme-foreground); background: var(--theme-background); overflow-wrap: anywhere; }
.storage-warning p { margin: .5rem 0; }
.storage-warning summary { cursor: pointer; font-weight: 700; }

.cloud-sync-error { display: block; margin: .5rem 0; padding: .75rem; border: 2px solid currentColor; border-radius: 6px; color: var(--theme-foreground); background: var(--theme-background); }
.cloud-sync-error-details { display: block; margin-top: .5rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.dashboard-lead { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.dashboard-lead p { margin: 0; }
.instrument-panel { --panel-mark: radial-gradient(circle at 35% 30%, #b4bcc2 0, #7a8187 35%, #464b51 62%, transparent 66%); display: flex; align-items: center; gap: .25rem; box-sizing: border-box; width: min(100%, 600px); flex-shrink: 0; padding: .5rem; background: var(--panel-mark) left 5px top 5px / 9px 9px no-repeat, var(--panel-mark) right 5px top 5px / 9px 9px no-repeat, var(--panel-mark) left 5px bottom 5px / 9px 9px no-repeat, var(--panel-mark) right 5px bottom 5px / 9px 9px no-repeat, #2b2f33; border-radius: 10px; box-shadow: inset 0 2px 5px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.instrument-panel .instrument-case { fill: transparent; }
.instrument-panel .instrument-screw { display: none; }
.instrument-screw-body { fill: #5b6269; stroke: #3a3f44; stroke-width: .6; }
.instrument-screw-glint { fill: #b4bcc2; opacity: .75; }
/* The dials share the panel width equally and the panel stops growing at 600px, so it never shrinks as the window widens. */
.instrument-panel > img, .instrument-panel > .instrument, .instrument-panel > .instrument-dial { width: 100%; height: auto; min-width: 0; aspect-ratio: 1 / 1; flex: 1 1 0; }
.instrument-panel .instrument-dial { max-width: none; }
.instrument { display: block; padding: 0; background: transparent; border: 0; border-radius: 8px; box-shadow: none; }
/* The shared button hover turns the background white, which flashes against the dark panel; lighten the panel slightly instead. */
.instrument:hover, .instrument:active { color: inherit; background: rgba(255,255,255,.07); box-shadow: none; }
.context-bar, .quick-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; align-items: end; }
.context-bar[role="status"] { grid-template-columns: auto minmax(0, 1fr); gap: .5rem .75rem; padding: .8rem 1rem; align-items: center; color: var(--theme-foreground); background: rgba(255,255,255,.35); border: 1px solid var(--control-disabled); border-radius: 6px; }
.context-bar[role="status"] span, .dashboard-page .context-bar[role="status"] small { color: var(--control-disabled); }
.context-bar[role="status"] > select { justify-self: start; min-width: 14rem; max-width: 100%; }
.context-details { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: .25rem 1.25rem; }
.context-details-toggle { display: none; }
.daily-streak-message, .daily-target-message, .wip-warning { flex: 1 0 100%; }
.daily-target-reached { border-color: var(--accent-colour); box-shadow: inset 4px 0 0 var(--accent-colour); }
.daily-target-message { color: var(--accent-colour); font-weight: 700; }
.wip-warning { display: block; color: var(--accent-colour); margin: .5rem 0 0; padding: .6rem .8rem; border: 2px solid var(--accent-colour); overflow-wrap: anywhere; }
.task-status-filter { display: flex; align-items: center; gap: .5rem; margin: .75rem 0; }
.task-status-filter select { max-width: 100%; }
.task-status-badge { display: inline-block; width: fit-content; padding: .05rem .35rem; border: 1px solid currentColor; border-radius: 2px; font-size: .85em; font-weight: 700; line-height: 1.4; }
.task-status-in-progress { color: #805800; background: rgba(154,107,0,.14); }
.task-urgency-badge { color: #8f2825; background: rgba(182,56,51,.12); }
.task-due-badge { color: #1f675c; background: rgba(40,125,112,.12); }
.task-supporting .task-status-badge { font-weight: 700; }
/* Todo, done, rejected and appointment statuses share the badge shape but stay quiet so in-progress stands out. */
.task-supporting .task-status-quiet { font-weight: 400; background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.quick-form { grid-template-columns: minmax(0, 2fr) minmax(90px, .7fr) auto; padding: 1rem; border: 1px solid var(--control-disabled); border-radius: 6px; }
.context-bar label, .quick-form label { display: flex; flex-direction: column; gap: .35rem; }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; }
.count-badge { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; color: white; background: var(--accent-colour); border-radius: 50%; font-weight: 700; }
.text-command { padding: .5rem 0; color: var(--accent-colour); background: transparent; border: 0; font-weight: 700; }
.button-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .5rem; width: min(100%, 48rem); }
.button-group > button { margin: 0; }

.entity-list { border-top: 1px solid var(--control-disabled); }
.entity-row { display: grid; grid-template-columns: 5px minmax(0, 1fr); gap: .8rem; align-items: center; width: 100%; min-height: 4.5rem; padding: .7rem 0; color: var(--theme-foreground); text-align: left; background-color: transparent; background-image: linear-gradient(var(--row-tint, transparent), var(--row-tint, transparent)); border-bottom: 1px solid var(--control-disabled); }
.entity-row-with-completion { grid-template-columns: auto 5px minmax(0, 1fr); }
.entity-row-content:hover, .entity-row-content:focus-visible { background: rgba(255,255,255,.45); }
.entity-row-content { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(40%) 1em; gap: .8rem; align-items: center; width: 100%; padding: 0; color: inherit; text-align: left; background: transparent; border: 0; }
:is(.entity-row-content, .flow-task-card),
:is(.entity-row-content, .flow-task-card):is(:hover, :active, :focus) { box-shadow: none; }
:is(.entity-row-content, .flow-task-card):focus-visible { box-shadow: none; outline: 2px solid var(--accent-colour); outline-offset: -2px; }
.entity-row-content-without-meta { grid-template-columns: minmax(0, 1fr) 1em; }
/* Task tiles drop the accent bar and chevron; urgency is carried by the row tint and badges. */
.entity-row-plain { grid-template-columns: minmax(0, 1fr); padding-inline: .5rem; }
.entity-row-plain.entity-row-with-completion { grid-template-columns: auto minmax(0, 1fr); }
.entity-row-content-plain { grid-template-columns: minmax(0, 1fr); }
/* Tile grid on wide screens, styled after the spotters .list-item: light fill, thin border, rounded corners, soft shadow. Reading order stays row by row, so rank is preserved. */
.entity-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .75rem; margin-bottom: .75rem; border-top: 0; }
.entity-list-grid .entity-row { min-height: 0; padding: .6rem .7rem; background-color: var(--tile-tint, var(--control-background)); background-image: none; border: 1px solid var(--control-foreground); border-radius: var(--radius); box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: box-shadow var(--transition); }
.entity-list-grid .entity-row:hover, .entity-list-grid .entity-row:focus-within { box-shadow: 0 4px 10px rgba(0,0,0,.24); }
.entity-list-grid .entity-row-content:hover, .entity-list-grid .entity-row-content:focus-visible { background: transparent; }
.entity-list-grid .task-title, .entity-list-grid .project-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
/* Project tiles: the colour bar becomes a full-height edge on the tile, clipped by its rounded corners. */
.entity-list-grid .entity-row-project { grid-template-columns: .5rem minmax(0, 1fr); gap: .7rem; padding: 0 .7rem 0 0; overflow: hidden; }
.entity-row-project .entity-accent { align-self: stretch; width: auto; height: auto; border-radius: 0; }
.entity-row-project .entity-row-content { padding: .6rem 0; }
.entity-completion { margin: 0 .1rem; }
.entity-row-completed .task-title, .entity-row-rejected .task-title { color: var(--control-disabled); text-decoration: line-through; }
.completed-expander { margin: 1rem 0 .5rem; padding: .35rem 0; color: var(--control-disabled); background: transparent; border: 0; font: inherit; font-weight: 700; }
.entity-accent { width: 5px; height: 2.7rem; background: var(--control-disabled); border-radius: 2px; }
.task-row-urgency-green { --row-tint: rgba(40,125,112,.07); --tile-tint: color-mix(in srgb, #287d70 24%, var(--theme-background)); }
.task-row-urgency-amber { --row-tint: rgba(154,107,0,.09); --tile-tint: color-mix(in srgb, #c89400 22%, var(--theme-background)); }
.task-row-urgency-red { --row-tint: rgba(182,56,51,.1); --tile-tint: color-mix(in srgb, #d6453f 18%, var(--theme-background)); }
.appointment-row-urgency-amber { --row-tint: rgba(154,107,0,.09); --tile-tint: color-mix(in srgb, #c89400 22%, var(--theme-background)); }
.appointment-row-urgency-red { --row-tint: rgba(182,56,51,.1); --tile-tint: color-mix(in srgb, #d6453f 18%, var(--theme-background)); }
.appointment-time-status { font-weight: 700; }
.appointment-time-amber { color: #9a6b00; }
.appointment-time-red { color: #b63833; }
.appointment-significance { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .5rem; }
.appointment-importance-badge { width: fit-content; padding: .1rem .35rem; border: 1px solid currentColor; border-radius: 2px; font-weight: 700; }
.entity-copy { display: flex; min-width: 0; flex-direction: column; gap: .22rem; overflow-wrap: anywhere; }
.project-title,
.task-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-title { font-weight: 700; }
.task-title { font-weight: 700; }
.entity-copy .project-description,
.entity-copy .task-supporting { font-size: .7em; font-weight: 400; }
.task-supporting span { font-weight: inherit; }
.task-supporting .task-project-name { font-weight: 600; }
.entity-meta { overflow-wrap: anywhere; }
.task-feasibility { font-weight: 700; }
.feasibility-green { color: #287d70; }
.feasibility-amber { color: #9a6b00; }
.feasibility-red { color: #b63833; }
.task-decision-flag, .task-consequence-flag { display: inline-flex; width: fit-content; padding: .2rem .4rem; border-left: 3px solid #b63833; color: #8f2825; font-weight: 700; }
.task-consequence-flag { border-left-color: #9a6b00; color: #805800; }
.weekly-throughput { display: grid; gap: .35rem; max-width: 38rem; margin: .75rem 0; padding: .75rem 0; border-top: 1px solid var(--control-disabled); border-bottom: 1px solid var(--control-disabled); }
.appointment-duration-value { display: block; margin-top: .35rem; }
.appointment-opportunity-cost { max-width: 520px; margin: 1rem 0; border-top: 1px solid var(--control-disabled); }
.appointment-opportunity-cost h3 { margin: .75rem 0; }
.appointment-opportunity-cost p { margin: .3rem 0; }
.dependent-tasks { max-width: 520px; margin: 1.5rem 0; padding-top: .75rem; border-top: 1px solid var(--control-disabled); }
.dependent-tasks ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.dependent-tasks li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--control-disabled); }
.empty-state { margin: 1rem 0; padding: 2rem 1rem; color: var(--control-disabled); text-align: center; border: 1px dashed var(--control-disabled); border-radius: 6px; }

.dashboard-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.2rem; }
.dashboard-lead + .dashboard-actions { margin: .75rem 0 1rem; }
.task-kind-switch { margin-bottom: .75rem; }

.detail-page { position: relative; }
.task-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; max-width: 680px; }
.task-title-heading { display: flex; min-width: 0; align-items: center; gap: .6rem; }
.task-title-row h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.task-project-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: .75rem 0; }
.task-project-editor { width: 100%; max-width: 520px; min-width: 0; }
.task-project-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.task-project-editor-heading label { margin: 0; }
.task-project-link { min-width: 0; max-width: 100%; color: inherit; font-weight: 700; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.task-project-row .icon-command { flex: 0 0 auto; }
.icon-command { padding: .35rem; color: var(--control-disabled); background: transparent; border: 0; font-size: 1.1rem; }
.task-title-edit { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; max-width: 680px; }
.task-title-edit .settings-row { flex: 1 1 18rem; margin: 0; }
.task-title-field { max-width: 520px; }
#page-task-detail input[aria-invalid="true"] { outline: 2px solid #b63833; outline-offset: 2px; }
.task-field-error { display: block; margin-top: .35rem; font-weight: 700; }
.task-save-status { max-width: 520px; }
.task-editor-commands { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.task-templates { margin-bottom: 1.5rem; scroll-margin-top: 5rem; }
.task-templates ul { list-style: none; padding: 0; }
.task-templates li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--control-disabled); }
.task-templates .entity-copy { flex: 1 1 14rem; }
.template-row-commands { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem; }
.template-csv-commands { display: flex; flex-wrap: wrap; gap: .5rem; }
.template-copy-command { max-width: 28rem; min-width: 0; }
.template-copy-command small { display: block; overflow-wrap: anywhere; }
.task-creation-hint { max-width: 520px; margin: .75rem 0; }
.detail-accent { display: block; width: 4rem; height: 6px; margin: 1rem 0; }

.csv-import-bar { display: flex; align-items: end; gap: .75rem; margin: 0 0 1.5rem; }
.csv-import-message { color: var(--accent-colour); font-weight: 700; }
.task-csv-import { overflow-wrap: anywhere; }
.task-csv-file-input { display: none; }
.task-csv-preview { margin-top: 1rem; }
/* Outside markers can be clipped by the scrolling list once row numbers grow. */
.task-csv-task-list { max-height: 28rem; overflow-y: auto; padding-left: 0; list-style-position: inside; }
.task-csv-task-list > li { padding: .5rem 0; border-bottom: 1px solid var(--control-disabled); }
.task-csv-notes { white-space: pre-wrap; }
.trello-import, .todoist-import { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.trello-file-input { display: none; }
.todoist-file-input { display: none; }
.trello-import-preview, .todoist-import-preview { margin-top: 1rem; padding: 1rem; border: 1px solid var(--control-disabled); border-radius: 6px; }
.trello-import-preview label, .todoist-import-preview label { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.trello-import-preview select, .todoist-import-preview select { width: 100%; min-width: 0; }
.trello-list-options, .trello-status-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .75rem; }
.trello-task-preview { max-height: 20rem; overflow-y: auto; padding-left: 1.5rem; }
.todoist-task-preview { max-height: 20rem; overflow-y: auto; padding-left: 1.5rem; }
.trello-list-filter, .trello-status-filter { margin: 1rem 0; padding: .75rem; min-width: 0; border: 1px solid var(--control-disabled); }
.trello-list-options label, .trello-status-options label { flex-direction: row; align-items: center; }
.planner-import { overflow-wrap: anywhere; }
.planner-import-preview { margin-top: 1rem; }
.planner-import fieldset { min-width: 0; border: 1px solid var(--control-disabled); }
.planner-import-preview label { display: flex; flex-direction: column; gap: .35rem; margin: .75rem 0; }
.planner-import-preview select { width: 100%; min-width: 0; }
.planner-status-options { display: flex; flex-wrap: wrap; gap: 1rem; }
.planner-status-options label, .planner-import-preview .planner-task-choice { flex-direction: row; align-items: center; }
.planner-task-preview { max-height: 32rem; overflow-y: auto; padding-left: 1.5rem; }
.planner-task-preview > li { padding: .5rem 0; border-bottom: 1px solid var(--control-disabled); }
.planner-task-detail, .calendar-event-detail { display: block; font-size: .9em; }
.planner-task-notes { white-space: pre-wrap; }

.action-list { max-width: 520px; margin: 1.5rem 0 0; }
.action-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.action-list-head h3 { margin: 0; }
.action-list ul { margin: .75rem 0 0; padding: 0; list-style: none; }
.action-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--control-disabled); }
.action-check-row { display: flex; align-items: center; gap: .6rem; }
.action-list li.action-done .action-check-row { color: var(--control-disabled); text-decoration: line-through; }
.action-row-tools { display: flex; align-items: center; gap: .2rem; }
/* The global button rule paints a box-shadow, so the chrome has to be cleared explicitly, not just the border. */
.action-row-tools .action-icon-button { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; margin: 0; padding: 0; color: var(--control-disabled); background: transparent; border: 0; box-shadow: none; font-size: 1.15rem; }
.action-row-tools .action-icon-button:hover:not(:disabled) { color: var(--theme-foreground); background: transparent; box-shadow: none; }
.action-row-tools .action-icon-button:active:not(:disabled) { color: var(--theme-foreground); background: transparent; box-shadow: none; transform: translateY(1px) scale(.9); }
.action-row-tools .action-icon-button:focus-visible { color: var(--theme-foreground); background: transparent; box-shadow: none; outline: 2px solid var(--accent-colour); outline-offset: -2px; }
.action-row-tools .action-icon-button:disabled { color: var(--control-disabled); opacity: .35; box-shadow: none; }
.action-edit-row { display: flex; width: 100%; align-items: center; flex-wrap: wrap; gap: .5rem; }
.action-edit-row .settings-row { flex: 1 1 14rem; margin: 0; }
.action-form { display: flex; gap: .5rem; margin-top: .9rem; }
.action-form input { flex: 1; min-width: 0; }

.schedule-panel { max-width: 40em; margin: 1.5rem 0 0; }
.schedule-editor-box { padding: .9rem .95rem .95rem; border: 1px solid var(--control-disabled); border-radius: 8px; background: rgba(255, 255, 255, .02); }
.schedule-editor-box .action-list-head { margin-bottom: .45rem; }
.schedule-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.due-time-controls { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.schedule-panel .recurrence-row { margin-top: .75rem; }
.recurrence-editor { margin-top: .75rem; }
.recurrence-row { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 520px;  }
.recurrence-interval { display: flex; align-items: center; gap: .4rem; }
.recurrence-interval input { width: 4rem; }

/* Flow session. The instrument keeps a fixed palette in every theme so it reads as an object rather than page chrome. */
.flow-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 520px); grid-template-rows: auto 1fr; grid-template-areas: "session task" "session actions"; gap: 1.5rem 2rem; align-items: start; }
.flow-task-summary { grid-area: task; min-width: 0; }
.flow-session-panel { grid-area: session; min-width: 0; width: 100%; max-width: 320px; justify-self: center; }
.flow-task-actions { grid-area: actions; min-width: 0; }
.flow-layout .flow-instrument { margin-top: 0; }
.flow-task-actions .action-list { margin-top: 0; }
.flow-task-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; align-items: center; width: 100%; max-width: 520px; min-height: 0; padding: .6rem .7rem; color: var(--theme-foreground); background-color: var(--control-background); border: 1px solid var(--control-foreground); border-radius: var(--radius); box-shadow: 0 2px 5px rgba(0,0,0,.18); font: inherit; text-align: left; cursor: pointer; }
.flow-task-card:hover, .flow-task-card:focus-visible { background-color: var(--control-background); box-shadow: 0 4px 10px rgba(0,0,0,.24); }
/* Space isn't tight here, so show the whole title however long it is. */
.flow-task-card .task-title { display: block; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.flow-instrument { display: flex; flex-direction: column; align-items: center; margin: 1.4rem 0 1rem; }
.flow-extensions { margin: .35rem 0 0; color: var(--accent-colour); font-weight: 700; }
.flow-annunciator { max-width: 520px; margin: 0 auto 1rem; padding: .7rem 1rem; color: #8a6000; background: #f7d071; border: 1px solid #b98800; border-radius: 4px; font-weight: 700; text-align: center; animation: flow-annunciator-flash 1.1s steps(1, end) infinite; }
@keyframes flow-annunciator-flash { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .flow-annunciator { animation: none; } }
.flow-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; max-width: 520px; margin: 0 auto 1rem; }
.flow-player-controls { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .4rem; width: min(100%, 320px); }
.flow-player-controls .flow-player-command { width: 100%; }
.flow-now-playing { display: grid; grid-template-columns: minmax(0, 1fr) 3rem; gap: .65rem; align-items: center; width: min(100%, 320px); margin: 0 auto 1rem; }
.flow-now-playing > span { display: flex; min-width: 0; min-height: 2.8rem; align-items: center; padding: .45rem .65rem; border: 1px solid var(--control-disabled); border-radius: 4px; overflow-wrap: anywhere; }
.flow-player-command { display: inline-flex; width: 3rem; min-height: 2.8rem; align-items: center; justify-content: center; }
.flow-player-snooze { color: white; background: var(--accent-colour); border-color: var(--accent-colour); }

/* Music library. One row per collection carries both what plays and what is held offline. */
.music-collection { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--control-disabled); }
.music-collection-choice { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; cursor: pointer; }
.music-collection-copy { display: flex; flex-direction: column; min-width: 0; }
.music-collection-copy strong { overflow-wrap: anywhere; }
.music-collection-actions { display: flex; flex-shrink: 0; gap: .2rem; }
.music-download-actions { flex-direction: column; align-items: flex-end; }
.music-import { display: grid; gap: .6rem; padding: .8rem 0 1rem; border-bottom: 1px solid var(--control-disabled); }
.music-import > input:not([type="file"]) { box-sizing: border-box; width: 100%; min-width: 0; }
.music-file-input { display: none; }
.music-import-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.music-import-actions button { max-width: 100%; white-space: normal; }
.music-import-status { margin: 0; overflow-wrap: anywhere; }

.instrument-dial { display: block; width: 100%; max-width: 320px; --dial-face: #12171a; --dial-ring: #39424a; --dial-tick: #98a4ab; --dial-tick-major: #e7efe9; --dial-numeral: #cfd9de; --dial-hand: #f2f6f3; --dial-flow-done: #4aa8e8; --dial-flow-todo: #1b3245; --dial-recharge-done: #f0c31a; --dial-recharge-todo: #463a12; --dial-bug-flow: #f0c31a; --dial-bug-recharge: #d9453d; --dial-digits: var(--dial-flow-done); --dial-case: #2b2f33; }
.instrument-recharge { --dial-digits: #f0c31a; --dial-tick: #6d757b; --dial-tick-major: #9aa4aa; --dial-numeral: #8b959b; }
.task-dial { --dial-bug-recharge: #e7efe9; }
.instrument-paused { --dial-hand: #6d757b; --dial-digits: #98a4ab; --dial-tick: #6d757b; --dial-numeral: #8b959b; }
.instrument-case { fill: var(--dial-case); }
.instrument-bezel { fill: #4c4c4c; }
.instrument-face { fill: var(--dial-face); }
.instrument-ring { fill: none; stroke: var(--dial-ring); stroke-width: 2; }
.instrument-tick { stroke: var(--dial-tick); stroke-width: 1.4; }
.instrument-tick-major { stroke: var(--dial-tick-major); stroke-width: 2.4; }
.instrument-index { stroke: var(--dial-tick-major); stroke-width: 3; }
.instrument-numeral { fill: var(--dial-numeral); font-size: 12px; font-weight: 700; }
.instrument-arc { fill: none; stroke-width: 14; }
.instrument-arc-flow-done { stroke: var(--dial-flow-done); }
.instrument-arc-flow-todo { stroke: var(--dial-flow-todo); }
.instrument-arc-recharge-done { stroke: var(--dial-recharge-done); }
.instrument-arc-recharge-todo { stroke: var(--dial-recharge-todo); }
.task-dial-tasks-band { stroke: var(--dial-flow-done); stroke-width: 7; }
.task-dial-vhours-band { stroke: var(--dial-recharge-done); stroke-width: 7; }
.instrument-arc-lap { fill: none; stroke: var(--dial-flow-done); stroke-width: 3; opacity: .55; }
.instrument-bug-flow { fill: var(--dial-bug-flow); }
.instrument-bug-recharge { fill: var(--dial-bug-recharge); }
.task-dial-vhours-bug { fill: var(--dial-recharge-done); }
.instrument-hand { stroke: var(--dial-hand); stroke-width: 5; stroke-linecap: round; }
.instrument-hand-secondary { stroke: var(--dial-recharge-done); stroke-width: 4; stroke-linecap: round; }
.instrument-hub { fill: var(--dial-hand); }
.instrument-window { fill: var(--dial-face); stroke: var(--dial-ring); stroke-width: 1.5; }
.instrument-digits { fill: var(--dial-digits); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.instrument-placard { fill: var(--dial-digits); font-size: 10px; font-weight: 700; letter-spacing: 2.5px; opacity: .75; }

.attitude-sky-top { stop-color: #1283cf; }
.attitude-sky-bottom { stop-color: #70c2f4; }
.attitude-ground { fill: #776a2f; }
.attitude-markings { fill: none; stroke: #fff; stroke-width: 2.5; }
.attitude-bank-scale .attitude-markings { stroke-width: 3.5; }
.attitude-index { fill: #fff; }
.attitude-aircraft { fill: #fcd301; stroke: #fcd301; stroke-width: 6; stroke-linejoin: miter; }
.attitude-aircraft path { fill: none; }
.attitude-aircraft circle { stroke: none; }
.work-days { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.work-days label { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.situation-list { padding-left: 0; list-style: none; overflow-wrap: anywhere; }
.situation-list li { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
.situation-list li > span { min-width: 0; }
.situation-list .icon-command { flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; }
.situation-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.situation-form input { box-sizing: border-box; width: 100%; min-width: 0; }
.situation-form > button[type="submit"] { justify-self: start; }
.situation-form [role="alert"] { overflow-wrap: anywhere; }
.calendar-import, .linked-appointment { margin-block: 1rem; overflow-wrap: anywhere; }
.calendar-import fieldset { margin-block: .75rem; min-width: 0; }
.calendar-option { display: flex; align-items: flex-start; gap: .5rem; padding-block: .5rem; }
.calendar-option input { flex: 0 0 auto; margin-top: .25rem; }
.calendar-range, .calendar-commands { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.calendar-range label { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.calendar-range input { max-width: 100%; box-sizing: border-box; }
.calendar-import-options label { display: grid; gap: .5rem; }
.calendar-import-options select { width: 100%; min-width: 0; }
.calendar-preview { list-style: none; padding: 0; }
.calendar-preview li { border-bottom: 1px solid var(--control-disabled); }
.calendar-event-unchanged { opacity: .5; }
.calendar-event-changes { font-weight: 700; }
.attitude-horizon { transition: transform .9s ease-in-out; }
article:not(.current) .attitude-horizon { transition: none; }
@media (prefers-reduced-motion: reduce) { .attitude-horizon { transition: none; } }

/* Below this, the row layout can't fit the instrument panel and context bar side by side. */
@media (max-width: 1024px) {
  .dashboard-lead { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
}

@media (max-width: 720px) {
  .flow-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; grid-template-areas: "task" "session" "actions"; }
  .dashboard-call-to-action { display: none; }
  .dashboard-lead { gap: .5rem; }
  .context-bar[role="status"] { width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .context-bar[role="status"] > select { width: 100%; min-width: 0; justify-self: stretch; }
  .context-details { display: none; }
  .context-details-expanded { display: grid; grid-column: 1 / -1; grid-row: 2; gap: .5rem; padding: .8rem 1rem; background: rgba(255,255,255,.35); border: 1px solid var(--control-disabled); border-radius: 6px; }
  .daily-target-reached .context-details { border-color: var(--accent-colour); box-shadow: inset 4px 0 0 var(--accent-colour); }
  .context-details-toggle { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: .5rem; background: transparent; border: 0; }
  .context-details-toggle .icon-chevron-right { transform: rotate(90deg); }
  .context-details-toggle[aria-expanded="true"] .icon-chevron-right { transform: rotate(-90deg); }
  .quick-form { grid-template-columns: 1fr 1fr; }
  .quick-form > button[type="submit"] { grid-column: 1 / -1; }
  .entity-meta { display: none; }
  .task-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; white-space: normal; }
  .csv-import-bar { flex-wrap: wrap; }
  .csv-import-message { flex-basis: 100%; }
  .action-form { flex-wrap: wrap; }
  .recurrence-row label { flex: 1 1 8rem; }
  :is(.dashboard-actions, .csv-import-bar, .task-title-edit, .task-editor-commands, .action-edit-row, .action-form) > button, .task-project-row > .task-project-link, .flow-controls:not(.flow-player-controls) > button { flex: 1 1 auto; }
}
