@import url("/tickets.css");
:root {
  --paper: #f6f7f4;
  --knowledge-nav-offset: 0px;
  --teal: #087b78;
}
body {
  font-family: Arial, "Noto Sans JP", sans-serif;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  max-width: 1600px;
  margin: auto;
}
.sidebar {
  background: var(--navy);
  color: #eff7f7;
  padding: 32px 22px;
  /* Keep the shared sticky position and viewport-bounded scroll area. */
}
.sidebar .caption {
  color: #a7bfca;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.workspace-name {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0 32px;
  font-size: 16px;
  font-weight: 700;
}
.workspace-name small {
  display: block;
  font-size: 10px;
  color: #adc2cc;
  font-weight: 400;
}
.workspace-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #26616a;
  color: #ddf8ee;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav button {
  text-align: left;
  background: transparent;
  color: #bcced6;
  border: 0;
  padding: 13px 10px;
  display: flex;
  gap: 14px;
  font-weight: 500;
}
.sidebar nav button span {
  font-size: 11px;
  opacity: 0.7;
}
.sidebar nav button[aria-current="page"] {
  background: #254656;
  color: white;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
  font-size: 12px;
  color: #bcced6;
}
.sidebar-bottom small {
  display: block;
  margin: 10px 0 25px;
  line-height: 1.8;
}
.sidebar-bottom a {
  font-size: 12px;
}
.topbar {
  padding: 17px 32px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 400;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--navy);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
}
.topbar .contact {
  border: 1px solid #d6e5e1;
  padding: 8px 14px;
  border-radius: 6px;
}
.shell main {
  padding: 28px 36px;
  min-width: 0;
}
.breadcrumb {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 10px;
  color: #b8c5c9;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
}
.eyebrow {
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.12em;
  font-weight: 700;
}
h1 {
  font-size: 32px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin: 8px 0;
}
h2 {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 8px;
}
h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
p {
  margin: 8px 0;
}
.page-heading p:last-child {
  color: var(--muted);
  font-size: 13px;
}
.sample-badge,
.badge {
  display: inline-block;
  border: 1px solid #d8e5df;
  border-radius: 5px;
  background: #eff5ee;
  color: #326450;
  padding: 3px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.badge.pending {
  color: #80631e;
  background: #fbf5df;
  border-color: #eee4c4;
}
.badge.closed {
  color: #677984;
  background: #edf0f2;
  border-color: #dfe5e9;
}
.context-bar {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.context-bar label {
  font-size: 10px;
  display: grid;
  gap: 5px;
  color: var(--muted);
}
select {
  font-size: 12px;
  max-width: 100%;
}
.context-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink);
}
.context-meta small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.context-bar button {
  font-size: 10px;
  padding: 7px;
  min-height: 34px;
}
/* The private demo has an identity and AI toggle instead of the sample's
   role selector. Keep its checkbox inline and let controls wrap together. */
#live-context {
  flex-wrap: wrap;
  gap: 12px 16px;
}
#live-context #identity {
  flex: 1 1 260px;
  min-width: 0;
  align-self: center;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#live-context > label {
  font-size: 11px;
}
#live-context > label.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d8e5df;
  border-radius: 6px;
  background: #f6f8f6;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
#live-context .checkbox input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
}
#live-context select,
#live-context button {
  min-height: 40px;
  font-size: 12px;
}
#live-context button {
  padding: 8px 12px;
}
#live-context ~ #content > .panel + .panel {
  margin-top: 16px;
}
#live-context ~ #content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.8;
  margin: 12px 0;
}
.status {
  min-height: 20px;
  font-size: 12px;
  color: #27645b;
}
.error {
  color: #a13838;
  background: #fff0ee;
  padding: 12px;
  border-radius: 6px;
}
.error:empty {
  display: none;
}
.tour {
  border: 1px solid #dce7df;
  border-radius: 9px;
  padding: 14px 18px;
  background: #f0f5ef;
  margin: 12px 0 22px;
}
.try-guide {
  background: #eef5f2;
  border: 1px solid #d4e4dd;
  border-left: 3px solid var(--teal);
  border-radius: 9px;
  padding: 20px;
  margin: 0 0 24px;
  overflow-wrap: anywhere;
}
.try-guide > p,
.try-guide li,
.try-example p {
  font-size: 12px;
  line-height: 1.8;
}
.try-guide ol {
  padding-left: 20px;
  margin: 12px 0;
}
.try-guide li + li {
  margin-top: 6px;
}
.try-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.try-example {
  background: white;
  border: 1px solid #dce7df;
  border-radius: 7px;
  padding: 14px;
  min-width: 0;
}
.try-example h3 {
  font-size: 13px;
  line-height: 1.7;
}
.try-example button {
  text-align: left;
  font-size: 12px;
}
.try-example p {
  color: var(--muted);
  margin-bottom: 0;
}
@media (max-width: 1000px) {
  .try-examples {
    grid-template-columns: 1fr;
  }
  .try-guide {
    padding: 16px;
  }
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}
summary span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 14px;
}
.tour-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.tour-steps button {
  background: white;
  text-align: left;
  position: relative;
  border: 1px solid #dce7df;
  min-width: 0;
  padding: 12px;
  font-size: 12px;
}
.tour-steps button > span {
  display: inline-grid;
  place-items: center;
  background: #ecf3ef;
  color: var(--teal);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 10px;
  margin-bottom: 9px;
}
.tour-steps b,
.tour-steps small {
  display: block;
}
.tour-steps small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 19px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metric span {
  font-size: 11px;
  color: var(--muted);
}
.metric strong {
  font-size: 25px;
  font-weight: 600;
  color: var(--navy);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 22px;
  min-width: 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-header p,
.hint {
  font-size: 12px;
  color: var(--muted);
}
.report-layout {
  display: grid;
  grid-template-columns: minmax(185px, 0.7fr) minmax(0, 1.7fr);
  gap: 18px;
}
.report-list {
  display: grid;
  align-content: start;
  gap: 9px;
}
.report-item {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  padding: 14px;
  white-space: normal;
}
.report-item[aria-pressed="true"] {
  border-color: var(--teal);
  box-shadow: inset 3px 0 var(--teal);
  background: #eff6f3;
}
.report-item small {
  display: block;
  font-size: 10px;
  margin: 6px 0;
  color: var(--muted);
}
.report-item .badge {
  font-size: 9px;
  padding: 1px 5px;
}
.record {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.record dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.record dd {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
}
.record:first-child {
  border-top: 0;
}
.stack {
  display: grid;
  gap: 14px;
}
.stack label,
.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.stack input,
.stack textarea {
  width: 100%;
  font-size: 13px;
  font-weight: 400;
}
.stack textarea {
  min-height: 90px;
}
.stack label.checkbox {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
}
.checkbox input {
  flex: none;
  width: 17px;
  margin-top: 3px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.primary,
.button.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #06635e;
  color: white;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 6px;
  min-height: 42px;
  font-size: 12px;
}
.subpanel {
  background: #f6f8f8;
  border: 1px solid #e4eaed;
  border-radius: 7px;
  padding: 16px;
  margin-top: 15px;
}
.subpanel p,
.subpanel li {
  font-size: 12px;
}
.subpanel ol {
  padding-left: 19px;
}
.role-prompt {
  padding: 22px;
  background: #eef4f3;
  border-radius: 7px;
  font-size: 13px;
}
.role-prompt p {
  color: var(--muted);
  font-size: 12px;
}
.draft-card + .draft-card,
.article-card + .article-card {
  margin-top: 16px;
}
.draft-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 16px 0;
}
.review-grid pre,
.article-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    13px/1.85 Arial,
    "Noto Sans JP",
    sans-serif;
  background: #f6f8f8;
  border-radius: 6px;
  padding: 16px;
  margin: 8px 0;
}
.review-grid textarea {
  min-height: 230px;
}
.empty {
  padding: 28px;
  text-align: center;
  background: #f5f8f7;
  border: 1px dashed #cadbd6;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.qa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(210px, 1fr);
  gap: 20px;
}
.suggestions {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.suggestions button {
  text-align: left;
  font-weight: 400;
  font-size: 12px;
}
.answer-card {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.answer-card h3 {
  font-size: 14px;
}
.citation {
  display: block;
  border: 1px solid #d8e5df;
  border-left: 3px solid var(--teal);
  padding: 14px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 12px;
}
.citation small {
  display: block;
  color: var(--muted);
}
.answer-question {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.scope {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  color: var(--muted);
}
.scope p {
  font-size: 12px;
  margin: 15px 0;
}
.footer {
  margin: 25px 0;
  padding: 25px;
  background: #eaf1ec;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.footer p {
  font-size: 14px;
}
.mobile-break {
  display: none;
}
.link-button {
  color: var(--teal);
  font-size: 12px;
}
.audit {
  font-size: 11px;
  color: var(--muted);
  list-style: none;
  padding: 0;
}
.audit li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.storage-warning {
  color: #8b5a17;
}
input,
textarea,
button,
select {
  max-width: 100%;
}
button {
  white-space: normal;
}
.request-note {
  background: #f8f5e9;
  color: #76642c;
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
}
#content,
#main,
.article-card {
  scroll-margin-top: calc(
    var(--workspace-header-height) + var(--knowledge-nav-offset) + 16px
  );
}
@media (min-width: 1600px) {
  .shell main {
    padding: 36px 52px;
  }
}
@media (max-width: 1150px) {
  #live-context #identity {
    flex-basis: 100%;
  }
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 16px;
  }
  .shell main {
    padding: 24px;
  }
  .context-bar {
    flex-wrap: wrap;
  }
  .context-meta {
    margin-left: 0;
    flex: 1 1 170px;
  }
  .tour-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qa-layout {
    grid-template-columns: 1fr;
  }
  .qa-layout > aside {
    order: -1;
  }
  .suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sample-badge {
    white-space: normal;
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  #live-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  #live-context #identity {
    grid-column: 1 / -1;
  }
  #live-context > label {
    min-width: 0;
  }
  #live-context > label.checkbox {
    align-self: end;
    padding: 8px;
    font-size: 11px;
  }
  #live-context button {
    min-height: 44px;
  }
  :root {
    --knowledge-nav-offset: 61px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    display: block;
    position: sticky;
    top: var(--workspace-header-height);
    z-index: 20;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - var(--workspace-header-height));
    border: 0;
    border-bottom: 1px solid #254656;
    padding: 8px 12px;
  }
  .sidebar .caption,
  .workspace-name,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .sidebar nav button {
    display: block;
    text-align: center;
    padding: 8px 3px;
    font-size: 11px;
    line-height: 1.3;
  }
  .sidebar nav button span {
    display: block;
    font-size: 9px;
  }
  .shell main {
    padding: 20px 16px;
  }
  .topbar {
    padding: 13px 16px;
  }
  .topbar nav {
    gap: 12px;
  }
  .topbar nav > a:first-child {
    display: none;
  }
  .brand {
    font-size: 14px;
  }
  .topbar .contact {
    padding: 6px 8px;
    font-size: 10px;
  }
  .page-heading {
    display: block;
    margin: 21px 0;
  }
  h1 {
    font-size: 28px;
  }
  .sample-badge {
    margin-top: 12px;
  }
  .context-bar {
    padding: 12px;
    gap: 10px;
  }
  .context-bar label {
    flex: 1 1 115px;
  }
  .context-meta {
    flex: 1 1 100%;
  }
  .context-bar button {
    flex: 1;
  }
  .tour {
    padding: 12px;
  }
  summary span {
    display: block;
    margin: 4px 0;
  }
  .tour-steps {
    gap: 8px;
  }
  .tour-steps button {
    padding: 10px;
    font-size: 11px;
  }
  .tour-steps small {
    font-size: 9px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 10px;
    display: block;
  }
  .metric span {
    display: block;
    font-size: 9px;
  }
  .metric strong {
    font-size: 22px;
  }
  .report-layout {
    grid-template-columns: 1fr;
  }
  .report-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-item {
    padding: 10px;
    font-size: 11px;
  }
  .panel {
    padding: 16px;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .suggestions {
    grid-template-columns: 1fr;
  }
  .section-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .footer {
    display: block;
  }
  .footer a {
    margin-top: 10px;
  }
  .actions button {
    font-size: 12px;
  }
  .context-bar select {
    font-size: 12px;
  }
  input,
  textarea {
    font-size: 16px !important;
  }
  .draft-meta {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 380px) {
  :root {
    --knowledge-nav-offset: 109px;
  }
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar nav button {
    min-height: 44px;
    padding: 6px;
  }
  .sidebar nav button span {
    display: none;
  }
}

[hidden] {
  display: none !important;
}
