/* Shared styling for the IP process guides (patent, trademark, design, copyright).
   Extracted from patent-process/index.html so the guides stay visually identical. */
:root {
      --blue: #149ddd;
      --blue-dark: #173b6c;
      --navy: #040b14;
      --ink: #272829;
      --muted: #6f7180;
      --line: #e3e8f0;
      --tint: #f5f8fd;
      --green: #2f9e63;
      --amber: #b8791b;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: "Open Sans", system-ui, -apple-system, sans-serif;
      color: var(--ink);
      background: #fff;
      font-size: 15px;
      line-height: 1.65;
      -webkit-text-size-adjust: 100%;
    }

    h1, h2, h3, h4 { font-family: "Raleway", sans-serif; color: var(--blue-dark); margin: 0; }

    a { color: var(--blue); }

    .wrap { max-width: 820px; margin: 0 auto; padding: 0 18px; }

    /* ---------- Masthead ---------- */
    .masthead {
      background: var(--navy);
      color: #fff;
      padding: 28px 0 24px;
      text-align: center;
    }
    /* logo.svg has no intrinsic size (width/height are 100%), so the card needs a
       definite width and the image a pinned ratio — otherwise Safari collapses it to 0. */
    .masthead .logo-card {
      display: block; width: 234px; max-width: 72%;
      margin: 0 auto 16px; background: #fff; border-radius: 10px; padding: 14px 22px;
    }
    .masthead .logo-card img {
      display: block; width: 100%; height: auto; aspect-ratio: 800 / 600;
    }
    .masthead h1 { color: #fff; font-size: 24px; font-weight: 700; line-height: 1.3; }
    .masthead .sub { color: #a8a9b4; font-size: 13.5px; margin-top: 8px; }
    .masthead .sub strong { color: #fff; font-weight: 600; }
    .masthead .home {
      display: inline-block; margin-top: 14px; font-size: 13px;
      color: #a8a9b4; text-decoration: none; border: 1px solid #2b3444;
      padding: 5px 14px; border-radius: 40px;
    }
    .masthead .home:hover { color: #fff; border-color: var(--blue); }

    /* ---------- Intro ---------- */
    .intro { padding: 26px 0 4px; }
    .intro p { margin: 0 0 12px; }
    .intro .lede { font-size: 16px; color: var(--blue-dark); font-weight: 600; }

    /* ---------- Category switch ---------- */
    .switch {
      position: sticky; top: 0; z-index: 20;
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(6px);
      border-bottom: 1px solid var(--line);
      padding: 10px 0;
      margin-bottom: 22px;
    }
    .switch-row { display: flex; align-items: center; gap: 10px; }
    .switch-row + .switch-row { margin-top: 7px; }
    .switch-label {
      font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
      color: var(--muted); font-weight: 700; flex: 0 0 56px; white-space: nowrap;
    }
    .switch-btns { display: flex; gap: 6px; flex: 1 1 auto; }
    .switch-btns button {
      flex: 1; padding: 7px 6px; border-radius: 6px; cursor: pointer;
      border: 1px solid var(--line); background: #fff; color: var(--muted);
      font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.3;
      transition: .15s;
    }
    .switch-btns button[aria-pressed="true"] {
      background: var(--blue); border-color: var(--blue); color: #fff;
    }

    /* ---------- Professional fees notice ---------- */
    .notice {
      display: flex; gap: 13px; align-items: flex-start;
      background: #fdf3e2; border: 1px solid #f0d9a8;
      border-left: 5px solid var(--amber);
      border-radius: 8px; padding: 15px 16px; margin: 20px 0 4px;
    }
    .notice > i { color: var(--amber); font-size: 21px; line-height: 1.1; flex: 0 0 auto; }
    .notice h4 {
      font-size: 16.5px; color: #8a5a10; font-weight: 700; margin-bottom: 4px;
    }
    .notice p { margin: 0; font-size: 13.5px; color: #6d4d17; line-height: 1.6; }
    .notice p + p { margin-top: 7px; }

    /* ---------- Simple vs detailed view ---------- */
    /* Simple view carries no fee information at all. */
    body.simple .e-fee,
    body.simple .summary,
    body.simple .switch-row.fees-row,
    body.simple .card > p,
    body.simple .card .tags,
    body.simple .card .meta,
    body.simple .card .callout,
    body.simple .card .fee-note,
    body.simple .card .fee-row,
    body.simple .detail-only { display: none; }
    body.detailed .essence { display: none; }

    body.simple .card { padding: 13px 15px; }
    body.simple .card h3 { font-size: 15.5px; }
    body.simple .step { margin-bottom: 12px; }
    body.simple .timeline::before { bottom: 30px; }

    .essence { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 5px; }
    .essence .e-text { font-size: 13px; color: var(--muted); flex: 1 1 auto; min-width: 0; }
    .essence .e-fee {
      font-family: "Raleway", sans-serif; font-weight: 700; font-size: 14.5px;
      color: var(--blue-dark); white-space: nowrap; flex: 0 0 auto;
    }
    .essence .e-fee.nil { color: var(--green); font-size: 12px; font-weight: 600; }

    /* ---------- Timeline ---------- */
    .timeline { position: relative; padding-left: 42px; }
    .timeline::before {
      content: ""; position: absolute; left: 15px; top: 12px; bottom: 60px;
      width: 2px; background: var(--line);
    }

    .step { position: relative; margin-bottom: 26px; }
    .step .num {
      position: absolute; left: -42px; top: 0;
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--blue); color: #fff;
      font-family: "Raleway", sans-serif; font-weight: 700; font-size: 14px;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 0 0 4px #fff;
    }
    .step.optional .num { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
    .step.final .num { background: var(--green); }

    .card {
      border: 1px solid var(--line); border-radius: 8px;
      padding: 16px 16px 4px; background: #fff;
    }
    .step.optional .card { background: var(--tint); border-style: dashed; }

    .card h3 { font-size: 17px; font-weight: 700; }
    .card > p { margin: 8px 0 12px; }

    .tags { margin: 6px 0 0; }
    .tag {
      display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
      text-transform: uppercase; padding: 2px 8px; border-radius: 3px; margin: 0 5px 5px 0;
    }
    .tag.req { background: #e7f4fb; color: var(--blue-dark); }
    .tag.opt { background: #fdf3e2; color: var(--amber); }
    .tag.time { background: #eef0f4; color: var(--muted); }

    /* ---------- Meta rows ---------- */
    .meta { border-top: 1px solid var(--line); padding: 10px 0; display: flex; gap: 10px; }
    .meta:last-of-type { border-bottom: none; }
    .meta i { color: var(--blue); font-size: 15px; margin-top: 2px; }
    .meta .k {
      font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
      color: var(--muted); font-weight: 700; margin-bottom: 1px;
    }
    .meta .v { font-size: 14px; }
    .meta .v small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

    /* ---------- Fees ---------- */
    .fee-row { background: var(--tint); border-radius: 6px; padding: 11px 12px; margin: 0 0 12px; }
    .fee-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
    .fee-line + .fee-line { margin-top: 7px; padding-top: 7px; border-top: 1px dotted #d5dce8; }
    .fee-line .what { font-size: 13.5px; color: var(--muted); flex: 1 1 auto; min-width: 0; }
    .fee-line .amt {
      font-family: "Raleway", sans-serif; font-weight: 700; font-size: 16px;
      color: var(--blue-dark); white-space: nowrap; flex: 0 0 auto; text-align: right;
    }
    .fee-line .amt.nil { color: var(--green); font-size: 13.5px; white-space: normal; flex: 0 1 auto; }

    /* Stages with no government fee at all */
    .fee-row.nil-row { display: flex; align-items: flex-start; gap: 8px; }
    .fee-row.nil-row i { color: var(--green); font-size: 14px; margin-top: 3px; }
    .fee-row.nil-row span { font-size: 13.5px; color: var(--green); font-weight: 600; }
    .fee-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

    ul.compact { margin: 6px 0 12px; padding-left: 18px; }
    ul.compact li { margin-bottom: 5px; }

    .callout {
      border-left: 3px solid var(--blue); background: var(--tint);
      padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; border-radius: 0 4px 4px 0;
    }
    .callout strong { color: var(--blue-dark); }

    /* ---------- Summary table ---------- */
    .summary { margin: 34px 0 0; }
    .summary h2, .closing h2 { font-size: 20px; margin-bottom: 4px; }
    .summary .hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
    table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
    th, td { text-align: left; padding: 9px 4px 9px 0; border-bottom: 1px solid var(--line); }
    th { background: var(--tint); color: var(--blue-dark); font-weight: 700; font-size: 12px;
         text-transform: uppercase; letter-spacing: .04em; padding-left: 8px; }
    th:last-child, td.amt { text-align: right; padding-right: 8px; }
    td .form-name { display: block; color: var(--muted); font-size: 12px; }
    td.amt { font-weight: 700; white-space: nowrap; color: var(--blue-dark);
             font-family: "Raleway", sans-serif; font-size: 15px; vertical-align: top; }
    td.amt.nil { color: var(--green); font-weight: 400; font-size: 13px; }
    tr.total td { border-top: 2px solid var(--blue); border-bottom: none; font-weight: 700; padding-top: 11px; }

    /* ---------- Closing ---------- */
    .closing { margin: 34px 0 0; }
    .closing p { margin: 8px 0 12px; }
    .disclaimer {
      border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
      font-size: 12.5px; color: var(--muted); background: var(--tint); margin-top: 18px;
    }
    .disclaimer strong { color: var(--blue-dark); }
    .disclaimer p { margin: 0 0 12px; }
    .disclaimer p:last-child { margin-bottom: 0; }

    /* Form references inside a fee line, mirroring td .form-name in the tables. */
    .fee-line .what .form-name { display: block; color: var(--muted); font-size: 12px; }

    /* ---------- Related guides (cross-links between the IP guides) ---------- */
    .related { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
    .related h3 { font-size: 15px; margin-bottom: 8px; }
    .related ul { margin: 0; padding-left: 18px; }
    .related li { font-size: 13.5px; margin-bottom: 5px; color: var(--muted); }
    .related a { font-weight: 600; }

    footer {
      background: var(--navy); color: #a8a9b4; text-align: center;
      padding: 26px 0; margin-top: 34px; font-size: 13.5px;
    }
    footer .name { color: #fff; font-family: "Raleway", sans-serif; font-weight: 600; font-size: 16px; }
    footer a { color: var(--blue); text-decoration: none; }
    footer .contact { margin-top: 8px; }
    footer .contact span { display: block; margin: 3px 0; }

    @media (min-width: 576px) {
      body { font-size: 15.5px; }
      .masthead h1 { font-size: 28px; }
      .wrap { padding: 0 24px; }
      footer .contact span { display: inline; margin: 0 10px; }
    }

    @media print {
      .switch { display: none; }
      .card, .step { break-inside: avoid; }
      .masthead, footer { background: #fff !important; color: #000 !important; }
      .masthead h1, footer .name { color: #000 !important; }
    }
