.weekly {
  --weekly-ink: #17382e;
  --weekly-muted: #5a6d62;
  --weekly-border: #dce5dc;
  --weekly-soft: #eef4ed;
  width: 100%;
  max-width: 1220px;
  display: grid;
  gap: 19px;
  color: var(--weekly-ink);
}
.weekly [hidden] { display: none; }
.weekly h1, .weekly h2, .weekly h3, .weekly h4, .weekly p { margin: 0; }
.weekly h1 { font-size: clamp(31px, 4.4vw, 52px); line-height: 1.08; }
.weekly h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(23px, 2.5vw, 30px); font-weight: 400; }
.weekly h3 { font-size: 15px; }
.weekly h4 { font-size: 12px; }
.weekly-points { margin: 6px 0; padding-left: 19px; font-size: 12px; line-height: 1.6; }
.weekly button, .weekly input, .weekly textarea, .weekly select { min-width: 0; }
.weekly label { display: grid; align-content: start; gap: 6px; margin: 0; min-width: 0; font-size: 12px; }
.weekly input, .weekly select, .weekly textarea { min-width: 0; width: 100%; }
.weekly textarea { min-height: 92px; }
.weekly .btn { white-space: normal; }
.weekly .btn-small { min-height: 35px; padding: 7px 11px; font-size: 12px; }
.weekly :is(button, a, input, textarea, select, summary):focus-visible { outline-offset: 3px; }
.weekly a { overflow-wrap: anywhere; text-underline-offset: .16em; }
.weekly-status:empty { display: none; }
.weekly-status { padding: 11px 15px; border: 1px solid #c7dac7; border-radius: 10px; background: #edf5eb; font-size: 13px; }
.weekly-status.is-error { color: #8a3327; border-color: #e5c4bb; background: #fff5f1; }
.weekly-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; border: 1px solid #315344; background: #123c2e; color: #fffdf4; border-radius: 16px; padding: clamp(22px, 3.7vw, 37px); }
.weekly-hero-copy { display: grid; gap: 10px; }
.weekly-hero-copy > p { max-width: 59ch; color: #d1e1d2; font-size: 13px; }
.weekly-kicker { color: var(--weekly-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; }
.weekly-hero .weekly-kicker { color: #c6d4b8; }
.weekly-calendar { display: grid; gap: 3px; min-width: 158px; padding: 14px 17px; border: 1px solid #5a7762; border-radius: 11px; color: #ededd7; background: #224a39; }
.weekly-calendar > strong { color: #fff8e9; font: 400 29px/1.1 Georgia, 'Times New Roman', serif; }
.weekly-calendar > span { font-size: 12px; }
.weekly-calendar > small { padding-top: 7px; color: #c4d4c1; font-size: 10px; }
.weekly-toolbar, .weekly-section-head, .weekly-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 11px; }
.weekly-toolbar { padding: 0 2px; }
.weekly-toolbar > .weekly-fields { flex: 1; }
.weekly-scope { display: grid; gap: 5px; min-width: 0; max-width: 320px; }
.weekly-scope select { min-width: 180px; }
.weekly-accounts { display: flex; flex-wrap: wrap; gap: 5px; }
.weekly-account { border: 1px solid var(--weekly-border); border-radius: 20px; padding: 3px 8px; background: #fcfdf8; color: #465a4b; font-size: 10px; }
.weekly-tabs { display: flex; gap: 5px; flex-wrap: wrap; padding-bottom: 4px; border-bottom: 1px solid var(--weekly-border); }
.weekly-tabs button { background: transparent; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; color: var(--weekly-muted); padding: 10px 12px; font-size: 13px; font-weight: 650; }
.weekly-tabs button:hover { background: var(--weekly-soft); }
.weekly-tabs button[aria-selected=true] { border-bottom-color: #285c3c; color: #143d2a; background: #eaf1e6; }
.weekly-panel { display: grid; gap: 16px; min-width: 0; }
.weekly-card { display: grid; gap: 14px; min-width: 0; border: 1px solid var(--weekly-border); border-radius: 13px; background: #fffefa; padding: clamp(16px, 2.6vw, 24px); }
.weekly-card > p { font-size: 13px; }
.weekly-muted { color: var(--weekly-muted); font-size: 12px; }
.weekly-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; }
.weekly-empty { padding: 15px 0; color: var(--weekly-muted); font-size: 13px; }
.weekly-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.weekly-fields .weekly-wide { grid-column: 1 / -1; }
.weekly-form { display: grid; gap: 12px; }
.weekly-form > .weekly-actions { justify-content: flex-end; }
.weekly-checks { display: grid; gap: 8px; border: 1px solid var(--weekly-border); border-radius: 9px; padding: 13px; margin: 0; }
.weekly-checks legend { padding: 0 5px; font-size: 12px; font-weight: 700; }
.weekly-checks label, .weekly-check { display: flex; align-items: start; gap: 9px; font-size: 12px; font-weight: 500; }
.weekly-checks input, .weekly-check input { flex: 0 0 auto; }
.weekly-checks label > span { display: grid; gap: 1px; }
.weekly-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.weekly-metric { display: grid; gap: 6px; border: 1px solid var(--weekly-border); background: #f5f7ef; padding: 16px; border-radius: 10px; }
.weekly-metric > dt { font-size: 11px; color: var(--weekly-muted); }
.weekly-metric > dd { margin: 0; font-size: clamp(20px, 2.4vw, 29px); font-weight: 700; letter-spacing: -.04em; }
.weekly-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.weekly-list { display: grid; gap: 10px; }
.weekly-item { display: grid; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--weekly-border); border-radius: 9px; background: #fafcf7; }
.weekly-item-header { display: flex; align-items: start; justify-content: space-between; gap: 11px; }
.weekly-item-header > div { display: grid; gap: 4px; }
.weekly-item-header strong { font-size: 13px; overflow-wrap: anywhere; }
.weekly-item-header small { color: var(--weekly-muted); font-size: 10px; }
.weekly-pill { display: inline-flex; align-items: center; width: fit-content; padding: 3px 7px; border: 1px solid #d8dfd2; border-radius: 20px; background: #f0f4ed; color: #45604d; font-size: 10px; font-weight: 650; white-space: nowrap; }
.weekly-pill.is-warning { background: #fbf1d9; color: #765419; border-color: #eadbb7; }
.weekly-pill.is-done { background: #e7f1e1; color: #315d30; border-color: #c6ddbd; }
.weekly-progress { display: flex; align-items: center; gap: 8px; color: #416246; font-size: 11px; }
.weekly-progress progress { width: 100%; height: 7px; border: 0; accent-color: #40753d; }
.weekly-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 13px; color: var(--weekly-muted); font-size: 10px; }
.weekly-details { border-top: 1px solid var(--weekly-border); padding-top: 10px; min-width: 0; }
.weekly-details > summary { cursor: pointer; font-size: 12px; font-weight: 650; color: #315342; }
.weekly-details > div { margin-top: 12px; }
.weekly-comment-list { display: grid; gap: 8px; margin: 0 0 9px; }
.weekly-comment { border-left: 2px solid #bed0b4; padding: 7px 10px; background: #f2f6ed; border-radius: 0 6px 6px 0; }
.weekly-comment .weekly-text { font-size: 12px; }
.weekly-comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.weekly-comment-form textarea { min-height: 55px; font-size: 12px; }
.weekly-comment-form button { align-self: end; }
.weekly-media { display: flex; flex-wrap: wrap; align-items: start; gap: 10px; }
.weekly-media figure { margin: 0; max-width: min(100%, 220px); }
.weekly-media img { display: block; width: 100%; max-height: 170px; object-fit: contain; border-radius: 8px; background: #eaf0e5; }
.weekly-media video, .weekly-media audio { display: block; max-width: 100%; width: min(100%, 360px); }
.weekly-media a { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.weekly-media figcaption { font-size: 10px; color: var(--weekly-muted); margin-top: 4px; }
.weekly-mindmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.weekly-mindmap > li { border: 1px solid #d5e0cd; background: #f0f5e9; border-radius: 9px; padding: 11px; }
.weekly-mindmap > li > strong { font-size: 13px; }
.weekly-mindmap ul { list-style: none; margin: 8px 0 0 5px; padding-left: 15px; border-left: 2px solid #c6d7ba; display: grid; gap: 6px; }
.weekly-mindmap ul > li { position: relative; padding-left: 9px; font-size: 12px; }
.weekly-mindmap ul > li::before { content: ''; position: absolute; left: -15px; top: .7em; width: 14px; height: 1px; background: #b1c8a3; }
.weekly-table-wrap { min-width: 0; overflow: auto; border: 1px solid var(--weekly-border); border-radius: 9px; }
.weekly-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.weekly-table th, .weekly-table td { padding: 10px 11px; border-bottom: 1px solid var(--weekly-border); text-align: left; vertical-align: top; }
.weekly-table th { background: #eff4e9; color: #446047; font-size: 10px; }
.weekly-table tr:last-child td { border-bottom: 0; }
.weekly-table td:first-child { overflow-wrap: anywhere; }
.weekly-report { overflow: hidden; border: 1px solid var(--weekly-border); border-radius: 13px; background: #fffefa; }
.weekly-report > header { display: grid; gap: 8px; background: #173e2d; color: #fffbea; padding: clamp(20px, 3vw, 33px); }
.weekly-report > header .weekly-kicker { color: #c5d4b4; }
.weekly-report > header .weekly-muted { color: #cbdcc6; }
.weekly-report > header h2 { font-size: clamp(28px, 4vw, 42px); }
.weekly-report > section { display: grid; gap: 13px; padding: clamp(18px, 2.7vw, 30px); border-bottom: 1px solid var(--weekly-border); }
.weekly-report > section:last-child { border-bottom: 0; }
.weekly-report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.weekly-report .weekly-metrics { margin: 0; }
.weekly-invite { padding: 15px; background: #eff4e9; border: 1px solid #cddfbe; border-radius: 9px; }
.weekly-invite input { font-size: 12px; }
.weekly-file-input { font-size: 11px; padding: 9px; }
@media (max-width: 1000px) {
  .weekly-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-columns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .weekly { gap: 14px; }
  .weekly-hero { grid-template-columns: 1fr; gap: 17px; }
  .weekly-calendar { grid-template-columns: auto auto; align-items: center; min-width: 0; gap: 5px 15px; }
  .weekly-calendar > strong { grid-column: 1; grid-row: 1 / 3; font-size: 24px; }
  .weekly-calendar > small { grid-column: 1 / -1; }
  .weekly-toolbar { display: grid; align-items: start; }
  .weekly-toolbar > .weekly-fields { width: 100%; }
  .weekly-fields { grid-template-columns: 1fr; }
  .weekly-fields .weekly-wide { grid-column: auto; }
  .weekly-tabs { gap: 2px; }
  .weekly-tabs button { padding: 9px 8px; font-size: 11px; }
  .weekly-metrics { gap: 8px; }
  .weekly-metric { padding: 12px; }
  .weekly-metric > dd { font-size: 22px; }
  .weekly-comment-form { grid-template-columns: 1fr; }
  .weekly-comment-form button { justify-self: end; }
  .weekly-report > section { break-inside: avoid; }
  .weekly-item-header { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .workspace:has(.weekly) :is(.topbar-left, .breadcrumb, .breadcrumb strong) { min-width: 0; }
  .workspace:has(.weekly) .breadcrumb { gap: 0; font-size: 0; }
  .workspace:has(.weekly) .breadcrumb > span { display: none; }
  .workspace:has(.weekly) .breadcrumb strong { font-size: 11px; overflow-wrap: anywhere; }
  .workspace:has(.weekly) .topbar-right { flex-shrink: 0; gap: 8px; }
}
@media print {
  body:has(.weekly-report) .app-shell, body:has(.weekly-report) .workspace { display: block; min-height: 0; }
  body:has(.weekly-report) .sidebar, body:has(.weekly-report) .topbar,
  body:has(.weekly-report) #toast-region, body:has(.weekly-report) .sidebar-overlay,
  body:has(.weekly-report) .weekly > :not(.weekly-panel),
  body:has(.weekly-report) .weekly-panel > :not(.weekly-report) { display: none !important; }
  body:has(.weekly-report) .content { padding: 0; max-width: none; }
  .weekly-report { border: 0; border-radius: 0; print-color-adjust: exact; }
  .weekly-report > section { break-inside: avoid; }
  .weekly-report .weekly-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .weekly-report .btn { display: none; }
}
