:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f6f8;
  --surface-strong: #eceef2;
  --text: #17181a;
  --muted: #676b73;
  --line: #e4e7eb;
  --accent: #17181a;
  --accent-text: #ffffff;
  --header: rgba(255, 255, 255, 0.88);
  --shadow: 0 20px 60px rgba(20, 24, 32, 0.10);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1013;
  --surface: #171a1f;
  --surface-strong: #20242b;
  --text: #f4f5f7;
  --muted: #a8aeb8;
  --line: #2b3038;
  --accent: #f4f5f7;
  --accent-text: #111317;
  --header: rgba(14, 16, 19, 0.88);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  transition: background-color 180ms ease, color 180ms ease;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand img {
  border-radius: 50%;
}

.brand span {
  display: grid;
  line-height: 1.05;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.top-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.top-links a:hover,
.back-link:hover {
  color: var(--text);
}

.back-link {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.theme-toggle {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.theme-label {
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  font-size: 17px;
}

.portal-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
}

.portal-main {
  display: grid;
  align-items: center;
}

.portal-hero {
  padding: 40px 0 34px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-areas:
    "logo copy"
    "actions actions";
  align-items: center;
  column-gap: 64px;
  row-gap: 28px;
}

.portal-logo {
  grid-area: logo;
  display: grid;
  place-items: center;
}

.portal-logo img {
  width: min(260px, 100%);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.10));
}

.portal-copy {
  grid-area: copy;
}

.portal-copy h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(44px, 5.2vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.portal-copy .lead {
  max-width: 690px;
  margin-bottom: 0;
}

.portal-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-card {
  position: relative;
  min-height: 132px;
  padding: 22px 54px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  align-content: center;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.portal-card-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.portal-card-index {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.portal-card-primary .portal-card-index,
.portal-card-primary small {
  color: color-mix(in srgb, var(--accent-text) 70%, transparent);
}

.portal-card strong {
  font-size: 21px;
}

.portal-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.portal-arrow {
  position: absolute;
  right: 22px;
  bottom: 21px;
  font-size: 24px;
}

.portal-footer {
  border-top: 1px solid var(--line);
}

.footer-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.footer-company {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-company-copy {
  display: grid;
}

.footer-company strong {
  color: var(--text);
  font-size: 12px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.social-button:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.social-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-email-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 160ms ease;
}

.contact-email-text:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-filing {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  text-align: right;
}

.footer-filing a {
  color: var(--muted);
  transition: color 160ms ease;
}

.footer-filing a:hover {
  color: var(--text);
}

.filing-pending {
  white-space: nowrap;
}

.content-main {
  padding: 74px 0 90px;
}

.content-hero {
  max-width: 1120px;
  padding-bottom: 54px;
}

.content-hero h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.content-hero .lead {
  max-width: 780px;
}

.keep-together {
  white-space: nowrap;
}

.content-section {
  padding: 54px 0;
  border-top: 1px solid var(--line);
}

.feature-grid,
.list-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.list-grid article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.feature-grid span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.feature-grid h2 {
  margin: 48px 0 10px;
  font-size: 22px;
}

.feature-grid p,
.list-grid p {
  color: var(--muted);
}

.list-grid article {
  min-height: 180px;
}

.list-grid strong {
  font-size: 19px;
}

.list-grid p {
  margin-top: 14px;
}

.content-cta {
  margin-top: 26px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.content-cta h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 40px);
}

.button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  white-space: nowrap;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.apply-main {
  min-height: calc(100dvh - 69px);
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.apply-panel {
  width: min(880px, 100%);
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 46px;
  box-shadow: var(--shadow);
}

.apply-panel img {
  width: 230px;
}

.apply-panel h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.1;
}

.apply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .portal-page {
    display: block;
  }

  .portal-main {
    display: block;
  }

  .portal-hero {
    padding: 54px 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "copy"
      "actions";
    text-align: center;
  }

  .portal-logo img {
    width: min(220px, 62vw);
  }

  .portal-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .portal-actions,
  .feature-grid,
  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-card:last-child {
    grid-column: 1 / -1;
  }

  .footer-row {
    padding: 22px 0;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-company {
    justify-content: center;
    flex-wrap: wrap;
  }

  .contact-email {
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-filing {
    justify-content: center;
    text-align: center;
  }

  .apply-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .apply-panel img {
    width: min(220px, 64vw);
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    min-height: 62px;
  }

  .top-links {
    display: none;
  }

  .brand small,
  .theme-label {
    display: none;
  }

  .theme-toggle {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .portal-copy h1 {
    font-size: 42px;
  }

  .portal-actions,
  .feature-grid,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .portal-card:last-child {
    grid-column: auto;
  }

  .content-main {
    padding-top: 52px;
  }

  .content-hero h1 {
    font-size: clamp(36px, 10.2vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.03em;
  }

  .about-title {
    word-break: normal;
    overflow-wrap: normal;
  }

  .content-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .apply-panel {
    padding: 28px;
  }
}


/* XILINOS PRIVACY V1 START */
.privacy-main {
  padding: 72px 0 96px;
}

.privacy-hero {
  padding-bottom: 42px;
}

.privacy-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(52px, 7vw, 86px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.privacy-hero .lead {
  max-width: 820px;
}

.privacy-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-summary {
  padding: 34px 0 54px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.privacy-summary article {
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  align-content: start;
}

.privacy-summary span,
.section-number {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.privacy-summary strong {
  font-size: 17px;
}

.privacy-summary p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-layout {
  padding-top: 54px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.privacy-toc {
  position: sticky;
  top: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: grid;
  gap: 9px;
}

.privacy-toc strong {
  margin-bottom: 8px;
}

.privacy-toc a {
  color: var(--muted);
  font-size: 13px;
}

.privacy-toc a:hover {
  color: var(--text);
}

.privacy-document {
  max-width: 800px;
}

.privacy-document > section {
  padding: 0 0 54px;
  scroll-margin-top: 24px;
}

.privacy-document > section + section {
  padding-top: 54px;
  border-top: 1px solid var(--line);
}

.privacy-document h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.privacy-document p,
.privacy-document li,
.privacy-document dd {
  color: var(--muted);
  font-size: 15px;
}

.privacy-document strong,
.privacy-document dt {
  color: var(--text);
}

.privacy-document a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-document ul {
  padding-left: 1.25em;
}

.privacy-document li + li {
  margin-top: 8px;
}

.privacy-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.privacy-list div {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
}

.privacy-list div + div {
  border-top: 1px solid var(--line);
}

.privacy-list dt,
.privacy-list dd {
  margin: 0;
}

.privacy-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.privacy-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.privacy-table th,
.privacy-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.privacy-table th {
  background: var(--surface);
}

.privacy-table td {
  color: var(--muted);
}

.privacy-table tr:last-child td {
  border-bottom: 0;
}

.privacy-note {
  margin-top: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.privacy-note p {
  margin: 8px 0 0;
}

.apply-privacy-link {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.apply-privacy-link a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-footer {
  border-top: 1px solid var(--line);
}

.privacy-footer-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-footer-row a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .privacy-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .privacy-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .privacy-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .privacy-toc strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .privacy-main {
    padding: 52px 0 72px;
  }

  .privacy-hero h1 {
    font-size: 52px;
  }

  .privacy-summary {
    grid-template-columns: 1fr;
  }

  .privacy-summary article {
    min-height: auto;
  }

  .privacy-toc {
    grid-template-columns: 1fr;
  }

  .privacy-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .privacy-footer-row {
    padding: 22px 0;
  }
}
/* XILINOS PRIVACY V1 END */

/* XILINOS HEADER ALIGNMENT V2 START */
/*
 * Reserve scrollbar space so short and long pages keep the same centered
 * header position. Browsers without scrollbar-gutter support ignore it.
 */
html {
  scrollbar-gutter: stable;
}

.site-header > .shell.nav {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header .brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .site-header > .shell.nav {
    width: min(100% - 28px, 1120px);
  }
}
/* XILINOS HEADER ALIGNMENT V2 END */

/* XILINOS HOMEPAGE MOBILE ALIGNMENT V2 START */
@media (max-width: 640px) {
  /*
   * Keep the trademark centered, but align all homepage copy to the same
   * left edge as the About page.
   */
  .portal-hero {
    text-align: left;
  }

  .portal-logo {
    place-items: center;
  }

  .portal-copy {
    width: 100%;
  }

  .portal-copy .eyebrow,
  .portal-copy h1,
  .portal-copy .lead {
    text-align: left;
  }

  .portal-copy .lead {
    margin-left: 0;
    margin-right: 0;
  }

  /*
   * Match the current mobile About-page heading scale and avoid a single
   * orphaned Chinese character on its own line.
   */
  .portal-copy h1 {
    font-size: clamp(36px, 10.2vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.03em;
  }
}
/* XILINOS HOMEPAGE MOBILE ALIGNMENT V2 END */
