/* Extracted verbatim from the Salesforce Assist prototype: tools/file-archive/salesforce-file-archive.html */
  :root{
    --primary: #e2711d;
    --primary-dark: #b95a14;
    --primary-tint: #fdf4ec;
    --primary-line: #f3d6bf;
    --ink: #1f2328;
    --ink-soft: #5f6770;
    --border: #e6e8eb;
    --surface: #ffffff;
    --canvas: #fafafa;
  }

  *{ box-sizing: border-box; }

  html, body{
    margin: 0;
    padding: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Archivo", sans-serif;
  }

  body{ min-height: 100vh; display: flex; flex-direction: column; }
  main{ flex: 1; }
  a{ text-decoration: none; color: inherit; }
  :focus-visible{ outline: 2px solid var(--primary); outline-offset: 3px; }

  /* ---------- Header ---------- */
  header.topbar{
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .topbar-inner{
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .brand{ display: flex; align-items: center; }
  .brand img{ width: 150px; height: auto; display: block; }

  /* ---------- Page ---------- */
  .page{
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 32px 88px;
  }

  .crumbs{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-bottom: 36px;
  }

  .crumbs a{ font-weight: 600; color: var(--primary-dark); }
  .crumbs a:hover{ text-decoration: underline; text-underline-offset: 3px; }
  .crumbs .sep{ color: #b8bec4; }

  .tool-head{ margin-bottom: 26px; max-width: 760px; }

  .tool-head h1{
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 10px;
  }

  .tool-head .lead{
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0;
  }

  /* ---------- Panel ---------- */
  .panel{
    max-width: 760px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .panel-section{ padding: 26px 28px; }
  .panel-section + .panel-section{ border-top: 1px solid var(--border); }

  .panel h2{
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
  }

  .account{ margin: 0; }

  .account-row{
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14.5px;
  }

  .account-row:first-child{ padding-top: 0; }
  .account-row:last-child{ border-bottom: none; padding-bottom: 0; }
  .account dt{ color: var(--ink-soft); }
  .account dd{ margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }

  .option + .option{ margin-top: 16px; }

  .option label{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
  }

  .option input{
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
  }

  .option-title{
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
  }

  .option-desc{
    display: block;
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-soft);
  }

  /* ---------- Actions ---------- */
  .actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    border-top: 1px solid var(--border);
    background: #fcfcfc;
    border-radius: 0 0 8px 8px;
  }

  .actions-left{ display: flex; align-items: center; gap: 18px; }

  .link{
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
  }

  .link:hover{ text-decoration: underline; text-underline-offset: 3px; }

  .btn{
    height: 42px;
    padding: 0 20px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }

  .btn-outline{
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
  }

  .btn-outline:hover{ border-color: #cfd4d9; background: var(--canvas); }

  .btn-primary{
    border: none;
    background: var(--primary);
    color: #fff;
  }

  .btn-primary:hover{ background: var(--primary-dark); }

  /* ---------- Footer ---------- */
  footer{
    text-align: center;
    padding: 28px;
    color: var(--ink-soft);
    font-size: 14px;
    border-top: 1px solid var(--border);
    background: #fff;
  }

  .tool-head{ max-width: 820px; }
  .tool-head .lead a, .note-text a{ color: var(--primary-dark); font-weight: 600; }
  .tool-head .lead a:hover, .note-text a:hover{ text-decoration: underline; text-underline-offset: 3px; }

  .layout{ max-width: none; }
  .panel{ max-width: none; }

  .status-line{
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #2f6e3a;
  }

  .status-line::before{
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a9a4a;
  }

  .source{
    font-size: 14.5px;
    color: var(--ink);
    margin: 0 0 6px;
  }

  .note-text{
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-soft);
  }

  .note-text + .note-text{ margin-top: 8px; }

  .danger-note{
    display: none;
    margin: 12px 0 0 29px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fdf0ee;
    border: 1px solid #f3d3cd;
    color: #8f2415;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .danger-note.is-visible{ display: block; }

  /* ---------- Run history ---------- */
  .history{ margin-top: 36px; }

  .history h2{
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 14px;
  }

  .table-card{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow-x: auto;
  }

  table{
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 820px;
  }

  th{
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    background: #fcfcfc;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  td{
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--ink);
  }

  tbody tr:last-child td{ border-bottom: none; }
  th:first-child, td:first-child{ padding-left: 20px; }
  th:last-child, td:last-child{ padding-right: 20px; }
  th.num, td.num{ text-align: right; }

  .empty-row td{
    text-align: center;
    padding: 36px 20px;
    color: var(--ink-soft);
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 620px){
    .topbar-inner{ padding: 14px 20px; }
    .page{ padding: 22px 20px 64px; }
    .crumbs{ margin-bottom: 26px; }
    .tool-head h1{ font-size: 28px; }
    .panel-section{ padding: 22px 20px; }
    .actions{ padding: 18px 20px; }
    .actions .btn-primary{ width: 100%; }
    .danger-note{ margin-left: 0; }
  }

  @media (prefers-reduced-motion: reduce){ *{ transition: none !important; } }

  /* ---------- Header nav ---------- */
  .top-nav{ display: flex; align-items: center; gap: 22px; }
  .top-nav a{
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
  }
  .top-nav a:hover{ color: var(--ink); }
  .top-nav a[aria-current="page"]{ color: var(--ink); border-bottom-color: var(--primary); }
