@import url("/fonts/fonts.css");
:root {
  --brand: #0a2342;
  --brand-2: #123562;
  --teal: #00857c;
  --teal-bright: #20c4b3;
  --mint: #e2f5f1;
  --surface: #fff;
  --surface-2: #f5f8fb;
  --line: #e0e7ef;
  --track: #e6ecf2;
  --fg: #0d1a2b;
  --muted: #5b6c80;
  --shadow: 0 1px 2px #0a23420f, 0 8px 24px -12px #0a23422e;
  --display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "Figtree", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  color-scheme: light;
  font-family: var(--body);
  color: var(--fg);
  font-synthesis: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #eef2f7;
  background-image:
    radial-gradient(60rem 30rem at 0% -10%, #20c4b324, transparent 60%),
    radial-gradient(50rem 30rem at 110% 0%, #1235621f, transparent 60%);
  background-attachment: fixed;
  font-size: 14px;
}
.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px max(20px, env(safe-area-inset-bottom));
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 0 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--brand);
  text-decoration: none;
  flex: none;
}
.ph-logo {
  width: 113px;
  height: 28px;
  display: block;
}
.wordmark {
  font: 600 16px var(--display);
  letter-spacing: 0.09em;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-controls select {
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 20px;
  background: #ffffffb8;
}
.header-controls button {
  padding: 6px 3px;
  font-size: 11px;
}
.hq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 460px;
}
nav {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
nav button {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 7px;
  border-radius: 10px;
  font-size: 13px;
}
nav button[aria-current="page"] {
  color: var(--brand);
  background: var(--surface);
  font-weight: 600;
  box-shadow: var(--shadow);
}
nav button[aria-current="page"] .icon {
  color: var(--teal);
}
.icon {
  width: 17px;
  height: 17px;
  flex: none;
}
main {
  padding: 22px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  color: var(--brand);
  margin: 0;
}
h1 {
  font-size: 23px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
p {
  margin: 0;
}
.subtle {
  color: var(--muted);
  font-size: 14px;
  margin-top: -7px;
}
.meta {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  background: var(--surface);
}
.card > h2,
.section-label {
  color: var(--muted);
  font: 700 10.5px var(--body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.hero {
  background: linear-gradient(150deg, #f0faf8, var(--surface) 70%);
}
.hero .section-label {
  color: var(--teal);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.badge::before {
  content: "";
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge.good {
  color: #167a4e;
  background: #e0f3e8;
}
.badge.info {
  color: #24589e;
  background: #e4edfa;
}
.badge.warn {
  color: #94600a;
  background: #fbf0d9;
}
.score-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gauge {
  width: 84px;
  height: 84px;
  flex: none;
}
.gauge text {
  fill: var(--brand);
  font: 600 22px var(--display);
}
.score-copy {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.score-copy h3 {
  font: 600 16px var(--body);
}
.score-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.score-details summary {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.category {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.category span {
  color: var(--muted);
  font-size: 11.5px;
}
.category strong {
  font-size: 16px;
  font-weight: 600;
}
.plan-summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.plan-summary li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
}
.plan-summary li > span:first-child {
  min-width: 0;
}
.linkbtn {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: start;
  align-self: flex-start;
}
.warning {
  background: #fff8e9;
  border-color: #eddfbb;
  color: #795713;
}
.warning > h2 {
  color: #795713;
}
.empty {
  border: 1px dashed var(--line);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 22px 16px;
  color: var(--muted);
  font-size: 13px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  align-items: start;
}
.row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.row > span:first-child {
  color: var(--muted);
}
.row > span:last-child {
  text-align: end;
  font-weight: 500;
}
.action {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.action summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.action summary::-webkit-details-marker {
  display: none;
}
.action summary:hover {
  background: var(--surface-2);
}
.action .action-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
}
.action .kind {
  display: block;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
}
.chevron {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--muted);
  transition: transform 0.15s;
}
.action[open] .chevron {
  transform: rotate(90deg);
}
.action-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}
.action-body > h3 {
  color: var(--muted);
  font: 700 10.5px var(--body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.action-body .row {
  padding: 3px 0;
}
.action-body ul,
.action-body ol {
  margin: 0;
  padding-inline-start: 18px;
}
.action-body li {
  padding-inline-start: 2px;
  margin: 6px 0;
}
.fact-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.fact-group > h2 {
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 700 10.5px var(--body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 13.5px;
}
.fact:last-child {
  border-bottom: 0;
}
.fact .lab {
  color: var(--muted);
  grid-column: 1 / -1;
}
.fact .value {
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fact .meta {
  display: block;
  margin-top: 3px;
  font-weight: 400;
}
.fact .controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.fact form {
  grid-column: 1 / -1;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
input,
select {
  font: inherit;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #cfdbe6;
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--surface-2);
  color: var(--fg);
}
form input,
form select {
  width: 100%;
}
.field-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-actions select {
  flex: 1;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand);
  border-radius: 20px;
  padding: 9px 14px;
  cursor: pointer;
}
button.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 600;
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--muted);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 3px;
}
.actions {
  padding: 12px 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.actions button {
  font-size: 12px;
  padding-inline: 0;
}
.actions a {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--teal);
  padding: 8px 16px;
  border-radius: 999px;
}
footer {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.saved {
  color: var(--teal);
  font-weight: 600;
}
[dir="rtl"] {
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}
[dir="rtl"] .chevron {
  transform: scaleX(-1);
}
[dir="rtl"] .action[open] .chevron {
  transform: rotate(-90deg) scaleX(-1);
}
@media (max-width: 350px) {
  .shell {
    padding-inline: 10px;
  }
  .site-header {
    gap: 6px;
  }
  .brand {
    gap: 7px;
  }
  .ph-logo {
    width: 94px;
    height: 24px;
  }
  .wordmark {
    font-size: 13px;
  }
  nav button {
    gap: 5px;
    padding-inline: 4px;
    font-size: 12px;
  }
  nav .icon {
    width: 15px;
    height: 15px;
  }
  .fact {
    padding-inline: 12px;
  }
}

.card > .focus-title {
  font: 500 17px / 1.45 var(--display);
  color: var(--brand);
  text-transform: none;
  letter-spacing: normal;
}
.action .badge {
  white-space: normal;
  max-width: 42%;
  text-align: center;
}
