/* iPhone feel. Loaded last on every page; overrides only. Keeps the REYES black and gold. */

/* Apple's system font for reading; the REYES wordmark keeps Avenir Next. */
*{font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',Arial,sans-serif}
.brand-wordmark,.brand-product{font-family:'Avenir Next',Avenir,'Helvetica Neue',Arial,sans-serif}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-tap-highlight-color:transparent}
a,button,summary,select,input,label{touch-action:manipulation}

/* 16px fields stop Safari from zooming the page when a field is tapped. */
input,select,textarea{font-size:16px}

/* Room for the notch, rounded corners and home bar when opened from the Home Screen. */
header{padding-top:env(safe-area-inset-top)}
header nav,main{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
footer{padding-bottom:env(safe-area-inset-bottom)}

/* Apple's minimum comfortable tap size. */
button,.examples button,summary,select,input:not([type=checkbox]){min-height:44px}
.examples button{font-size:13px;padding:10px 12px}

/* Disclosure rows with a chevron, like iOS lists. */
/* body:not(.x) outranks older rules such as .calculator summary{display:list-item}. */
body:not(.x) main summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}
main summary::-webkit-details-marker{display:none}
body:not(.x) main summary::after{content:'›';flex:none;font-size:22px;line-height:1;color:#a89e8d;transition:transform .2s;margin-left:auto}
body:not(.x) main details[open]>summary::after{transform:rotate(90deg)}

/* "More information" groups Details, Sources, program rules and Fees behind one row. */
.result-more{margin-top:20px;border-top:1px solid #554a38}
.result-more>summary{min-height:48px;font-size:15px;font-weight:500;color:#ead3a3;padding:12px 0}
.result-more>.calculator-secondary{margin-top:0;border-top:0;padding-left:12px;border-left:1px solid #383124}

@media(max-width:740px){
  /* Result facts as one full-width grouped list instead of two narrow columns. */
  .calculator-metrics{display:block;padding:0;margin:18px 0;border:0;border-radius:12px;background:#12110d;overflow:hidden}
  .calculator-metrics>div{padding:13px 16px;border-bottom:1px solid #2b261c}
  .calculator-metrics>div:last-child{border-bottom:0}
  .calculator-metrics dt{font-size:12px;letter-spacing:0;text-transform:none;color:#a89e8d}
  .calculator-metrics dd{font-size:16px;line-height:1.45;margin-top:3px}
  .calculator .calculator-answer{font-size:30px;letter-spacing:-.5px}
  .calculator-reason{font-size:15px}
  .calculator footer{font-size:12px}
}

/* Icon headline: the app's own verdict, with an icon beside it. */
.calculator-head{display:flex;gap:14px;align-items:flex-start}
.calculator-head>div{min-width:0}
.status-icon{flex:none;width:46px;height:46px;border-radius:50%;border:1.5px solid #d7bd89;color:#d7bd89;display:flex;align-items:center;justify-content:center;margin-top:2px}
.status-icon svg{width:24px;height:24px}
.status-stop{border-color:#c98a78;color:#e0a493}
.status-conflict{border-color:#edca85;color:#edca85}
.calculator-head .calculator-reason{margin-top:6px}

/* Fact rows with a leading icon, like an iOS list. */
.calculator-metrics>div{position:relative}
.calculator-metrics>.limit-metric,.calculator-metrics>.authorization-metric,.billing-card{padding-left:48px!important;position:relative}
.calculator-metrics>.limit-metric::before,.calculator-metrics>.authorization-metric::before,.billing-card::before{content:'';position:absolute;left:14px;top:16px;width:22px;height:22px;background:#d7bd89;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.limit-metric{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3'/%3E%3Cpath d='M18 3v4h-4M6 21v-4h4'/%3E%3C/svg%3E")}
.authorization-metric{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E")}
.billing-card{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h4'/%3E%3C/svg%3E")}

/* Patient billing: verdict visible, explanation behind "Why". */
.calculator .billing-card{border-radius:12px}
.billing-u21 h3{margin:2px 0 0!important}
.billing-why{margin-top:6px}
.billing-why>summary{min-height:36px!important;font-size:14px;color:#d7bd89}
.calculator-frequency-note{font-size:13px;color:#a89e8d}

/* Fewer words around the edges on phones. */
@media(max-width:740px){
  .brand-tagline{display:none}
  .calculator-head .calculator-answer{font-size:26px}
}
