:root {
  color-scheme: light;
  --ink: #101010;
  --secondary: rgb(0 0 0 / 65%);
  --muted: rgb(0 0 0 / 57%);
  --border: rgb(0 0 0 / 12%);
  --soft: rgb(0 0 0 / 4%);
  --hover: rgb(0 0 0 / 6%);
  --focus: #1768a3;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #fff; color: var(--ink); font: 400 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 30; padding: 8px 12px; background: #fff; border: 1px solid var(--ink); }
.skip-link:focus { top: 12px; }
.shell { width: min(100% - 96px, 1600px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 48px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand-separator { color: rgb(0 0 0 / 28%); font-weight: 400; }
.brand-section { color: var(--secondary); font-weight: 400; letter-spacing: -.015em; }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a { font-size: 14px; font-weight: 500; text-decoration: none; }
.header-nav a:hover, .text-button:hover, .clear-filter:hover, .back-link:hover { text-decoration: underline; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--secondary); font-size: 13px; }
.account form { margin: 0; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; }
.page-content { min-height: calc(100vh - 137px); padding-top: 42px; padding-bottom: 96px; }
.site-footer { border-top: 1px solid var(--border); padding-top: 17px; padding-bottom: 24px; color: var(--muted); font-size: 12px; }
.messages { max-width: 720px; margin-bottom: 24px; }
.message { margin: 0 0 8px; padding: 12px 16px; border-left: 3px solid var(--ink); background: var(--soft); font-size: 14px; }
.message-error { border-color: #b24040; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.1; letter-spacing: -.05em; font-weight: 550; }
h2 { font-weight: 550; letter-spacing: -.025em; }
.eyebrow { margin-bottom: 14px; color: var(--secondary); font-size: 13px; font-weight: 500; }
.page-heading { margin-bottom: 40px; }
.page-heading > p:last-child, .board-heading p:last-child { margin-bottom: 0; color: var(--secondary); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 43px; padding: 9px 16px; border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.25; transition: background-color .15s ease, border-color .15s ease; }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: #333; }
.button-secondary { border-color: var(--border); background: #fff; color: var(--ink); }
.button-secondary:hover { background: var(--soft); border-color: rgb(0 0 0 / 25%); }
.button-plain { color: var(--ink); background: transparent; }
.button-plain:hover { background: var(--soft); }
.button-full { width: 100%; }
.board-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 42px; }
.board-heading .button { flex: none; }
.board-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.search-wrap { flex: 1 1 260px; max-width: 360px; }
.filter-wrap { flex: 0 1 194px; }
.board-toolbar input, .board-toolbar select { width: 100%; min-height: 42px; }
.result-count { margin-left: auto; color: var(--muted); font-size: 13px; }
.clear-filter { padding: 6px; font-size: 13px; }
.board-hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.board-scroll { width: 100%; overflow-x: auto; padding-bottom: 14px; scrollbar-color: rgb(0 0 0 / 22%) transparent; }
.kanban-board { display: grid; grid-template-columns: repeat(6, minmax(260px, 1fr)); gap: 14px; min-width: 1630px; align-items: start; }
.kanban-column { min-height: 260px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; transition: border-color .15s ease, background-color .15s ease; }
.kanban-column.is-drop-target { border-color: var(--ink); background: var(--soft); }
.column-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 58px; padding: 17px 16px 12px; border-bottom: 1px solid var(--border); }
.column-head h2 { margin: 0; font-size: 14px; line-height: 1.35; }
.column-count { color: var(--muted); font-size: 13px; }
.column-body { display: grid; align-content: start; gap: 10px; min-height: 200px; padding: 12px; }
.column-empty { margin: 16px 4px; color: var(--muted); font-size: 13px; }
.ticket-card { padding: 14px; border: 1px solid var(--border); border-radius: 7px; background: #fff; cursor: grab; }
.ticket-card:hover { border-color: rgb(0 0 0 / 30%); }
.ticket-card:active { cursor: grabbing; }
.ticket-card.is-dragging { opacity: .5; }
.ticket-top, .ticket-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticket-id, .ticket-bottom { color: var(--muted); font-size: 12px; }
.ticket-card h3 { margin: 16px 0 20px; font-size: 15px; line-height: 1.4; font-weight: 550; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ticket-card h3 a { text-decoration: none; }
.ticket-card h3 a:hover { text-decoration: underline; }
.ticket-bottom { padding-top: 11px; border-top: 1px solid var(--border); }
.ticket-bottom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-bottom time { flex: none; }
.priority { color: var(--secondary); font-size: 12px; white-space: nowrap; }
.priority-high { color: #9a3b24; }
.blocked-label { display: inline-flex; margin: -6px 0 15px; color: #9a3b24; font-size: 12px; font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px; color: var(--secondary); font-size: 14px; text-decoration: none; }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 52px; }
.detail-heading h1 { max-width: 840px; overflow-wrap: anywhere; }
.detail-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.status-tag { display: inline-flex; padding: 4px 9px; border-radius: 5px; background: var(--soft); color: var(--ink); font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(40px, 6vw, 110px); align-items: start; }
.detail-main { max-width: 860px; }
.content-section { margin-bottom: 52px; }
.content-section > h2, .section-heading h2 { margin-bottom: 14px; font-size: 18px; }
.prose { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.section-heading { display: flex; align-items: baseline; gap: 10px; }
.section-count { color: var(--muted); font-size: 13px; }
.simple-list { list-style: none; margin: 0 0 20px; padding: 0; }
.simple-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.simple-list li span { color: var(--muted); font-size: 12px; text-align: right; }
.simple-list li a { overflow-wrap: anywhere; }
.simple-list li.muted { border: 0; }
.upload-form { margin-top: 20px; }
.inline-form { display: flex; align-items: center; gap: 12px; }
.inline-form input { min-width: 0; flex: 1; }
.comment-list { display: grid; gap: 24px; margin-top: 18px; }
.comment { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.comment-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 13px; }
.comment-heading strong { font-weight: 550; }
.comment-heading time { color: var(--muted); }
.comment p { margin: 0; overflow-wrap: anywhere; line-height: 1.6; }
.comment-form { margin-top: 32px; }
.comment-form textarea { margin-bottom: 12px; }
.detail-aside { border-top: 1px solid var(--ink); }
.aside-section { padding: 24px 0; border-bottom: 1px solid var(--border); }
.aside-section h2 { margin: 0 0 8px; font-size: 14px; }
.aside-section h2:not(:first-child) { margin-top: 20px; }
.aside-section p { margin: 0; font-size: 14px; }
.aside-section .current-state { margin-bottom: 18px; font-size: 17px; font-weight: 550; }
.aside-section form { margin-top: 18px; }
.aside-section select, .aside-section textarea { margin-bottom: 10px; }
.aside-section .blocked-reason { color: #9a3b24; }
.activity-list { margin: 16px 0 0; padding-left: 18px; }
.activity-list li { padding: 0 0 16px 5px; }
.activity-list li::marker { color: rgb(0 0 0 / 35%); font-size: 10px; }
.activity-list p { margin: 0 0 3px; }
.activity-list span { color: var(--muted); font-size: 12px; }
.narrow-page { width: min(100%, 720px); }
.item-form { display: grid; gap: 23px; }
.field { display: grid; gap: 7px; }
label { display: block; font-size: 13px; font-weight: 550; }
input[type="text"], input[type="search"], input[type="password"], input[type="date"], select, textarea { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid rgb(0 0 0 / 22%); border-radius: var(--radius); background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.field-help { margin: 0; color: var(--muted); font-size: 12px; }
.error-text, .form-error { color: #a52e2e; font-size: 13px; }
.field-error input, .field-error select, .field-error textarea { border-color: #a52e2e; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.muted { color: var(--muted); }
.notification-list { display: grid; border-top: 1px solid var(--border); }
.notification-list form { border-bottom: 1px solid var(--border); }
.notification { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 18px 12px; border: 0; background: #fff; text-align: left; }
.notification:hover { background: var(--soft); }
.notification-unread { border-left: 3px solid var(--ink); padding-left: 9px; }
.notification span { display: grid; gap: 3px; }
.notification strong { font-size: 14px; font-weight: 550; }
.notification small, .notification time { color: var(--muted); font-size: 12px; }
.notification time { white-space: nowrap; }
.empty-state { padding: 54px 24px; background: var(--soft); }
.empty-state h2 { margin-bottom: 8px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--secondary); }
.project-list { display: grid; gap: 12px; max-width: 720px; }
.project-link { display: flex; justify-content: space-between; gap: 16px; padding: 21px 22px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; }
.project-link:hover { border-color: var(--ink); }
.project-link strong { font-weight: 550; }
.project-link span { color: var(--secondary); font-size: 13px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: clamp(40px, 10vw, 180px); padding-top: clamp(45px, 10vw, 145px); }
.login-intro h1 { max-width: 610px; font-size: clamp(44px, 5vw, 76px); }
.login-intro > p:last-child { max-width: 420px; margin-top: 24px; color: var(--secondary); font-size: 18px; }
.login-panel { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); }
.login-panel h2 { margin-bottom: 25px; font-size: 20px; }
.login-panel form { display: grid; gap: 19px; }

@media (max-width: 1000px) {
  .shell { width: min(100% - 48px, 1600px); }
  .header-inner { gap: 24px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; }
  .account-name { display: none; }
  .login-layout { gap: 48px; }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 40px, 1600px); }
  .header-inner { min-height: 68px; flex-wrap: wrap; gap: 8px 20px; padding-block: 12px; }
  .brand { width: calc(100% - 58px); }
  .header-nav { order: 3; width: 100%; gap: 20px; }
  .account { margin-left: auto; }
  .page-content { padding-top: 30px; padding-bottom: 70px; }
  .board-heading, .detail-heading { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 32px; }
  .board-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .search-wrap { grid-column: 1 / -1; max-width: none; }
  .filter-wrap { min-width: 0; }
  .board-toolbar .button { grid-column: 1 / 2; }
  .result-count { align-self: center; text-align: right; }
  .board-hint { display: none; }
  .board-scroll { overflow: visible; }
  .kanban-board { display: grid; grid-template-columns: 1fr; min-width: 0; gap: 18px; }
  .kanban-column { min-height: 0; }
  .column-body { min-height: 0; }
  .detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-aside { max-width: none; }
  .simple-list li, .notification { flex-direction: column; gap: 4px; }
  .simple-list li span { text-align: left; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .login-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 20px; }
  .login-panel { padding: 24px; }
  .login-intro h1 { font-size: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .kanban-column { transition: none; }
}

